Commit 7aef18d3 authored by Niels Möller's avatar Niels Möller

nettle_hash instances for sha512_224 and sha512_256.

parent 6846fe56
2014-04-09 Niels Möller <nisse@lysator.liu.se> 2014-04-09 Niels Möller <nisse@lysator.liu.se>
* nettle-meta.h (nettle_sha512_224, nettle_sha512_256): Declare.
* sha512-224-meta.c (nettle_sha512_224): New file, new nettle_hash.
* sha512-256-meta.c (nettle_sha512_256): New file, new nettle_hash.
* sha2.h (SHA512_224_DIGEST_SIZE, SHA512_224_DATA_SIZE) * sha2.h (SHA512_224_DIGEST_SIZE, SHA512_224_DATA_SIZE)
(SHA512_256_DIGEST_SIZE, SHA512_256_DATA_SIZE): New constants. (SHA512_256_DIGEST_SIZE, SHA512_256_DATA_SIZE): New constants.
......
...@@ -119,6 +119,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c \ ...@@ -119,6 +119,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c \
sha1.c sha1-compress.c sha1-meta.c \ sha1.c sha1-compress.c sha1-meta.c \
sha256.c sha256-compress.c sha224-meta.c sha256-meta.c \ sha256.c sha256-compress.c sha224-meta.c sha256-meta.c \
sha512.c sha512-compress.c sha384-meta.c sha512-meta.c \ sha512.c sha512-compress.c sha384-meta.c sha512-meta.c \
sha512-224-meta.c sha512-256-meta.c \
sha3.c sha3-permute.c \ sha3.c sha3-permute.c \
sha3-224.c sha3-224-meta.c sha3-256.c sha3-256-meta.c \ sha3-224.c sha3-224-meta.c sha3-256.c sha3-256-meta.c \
sha3-384.c sha3-384-meta.c sha3-512.c sha3-512-meta.c\ sha3-384.c sha3-384-meta.c sha3-512.c sha3-512-meta.c\
......
...@@ -119,6 +119,8 @@ extern const struct nettle_hash nettle_sha224; ...@@ -119,6 +119,8 @@ extern const struct nettle_hash nettle_sha224;
extern const struct nettle_hash nettle_sha256; extern const struct nettle_hash nettle_sha256;
extern const struct nettle_hash nettle_sha384; extern const struct nettle_hash nettle_sha384;
extern const struct nettle_hash nettle_sha512; extern const struct nettle_hash nettle_sha512;
extern const struct nettle_hash nettle_sha512_224;
extern const struct nettle_hash nettle_sha512_256;
extern const struct nettle_hash nettle_sha3_224; extern const struct nettle_hash nettle_sha3_224;
extern const struct nettle_hash nettle_sha3_256; extern const struct nettle_hash nettle_sha3_256;
extern const struct nettle_hash nettle_sha3_384; extern const struct nettle_hash nettle_sha3_384;
......
/* sha512-224-meta.c */
/* nettle, low-level cryptographics library
*
* Copyright (C) 2014 Niels Möller
*
* The nettle library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The nettle library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the nettle library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02111-1301, USA.
*/
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "nettle-meta.h"
#include "sha2.h"
const struct nettle_hash nettle_sha512_224 =
{
"sha512-224", sizeof(struct sha512_ctx),
SHA512_224_DIGEST_SIZE,
SHA512_224_DATA_SIZE,
(nettle_hash_init_func *) sha512_224_init,
(nettle_hash_update_func *) sha512_224_update,
(nettle_hash_digest_func *) sha512_224_digest
};
/* sha512-256-meta.c */
/* nettle, low-level cryptographics library
*
* Copyright (C) 2014 Niels Möller
*
* The nettle library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The nettle library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the nettle library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02111-1301, USA.
*/
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "nettle-meta.h"
#include "sha2.h"
const struct nettle_hash nettle_sha512_256 =
{
"sha512-256", sizeof(struct sha512_ctx),
SHA512_256_DIGEST_SIZE,
SHA512_256_DATA_SIZE,
(nettle_hash_init_func *) sha512_256_init,
(nettle_hash_update_func *) sha512_256_update,
(nettle_hash_digest_func *) sha512_256_digest
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment