Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/hash.h
/********************************************************************** | /********************************************************************** | ||||
* Copyright (c) 2014 Pieter Wuille * | * Copyright (c) 2014 Pieter Wuille * | ||||
* Distributed under the MIT software license, see the accompanying * | * Distributed under the MIT software license, see the accompanying * | ||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* | ||||
**********************************************************************/ | **********************************************************************/ | ||||
#ifndef _SECP256K1_HASH_ | #ifndef SECP256K1_HASH_H | ||||
#define _SECP256K1_HASH_ | #define SECP256K1_HASH_H | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <stdint.h> | #include <stdint.h> | ||||
typedef struct { | typedef struct { | ||||
uint32_t s[8]; | uint32_t s[8]; | ||||
uint32_t buf[16]; /* In big endian */ | uint32_t buf[16]; /* In big endian */ | ||||
size_t bytes; | size_t bytes; | ||||
Show All 16 Lines | typedef struct { | ||||
unsigned char k[32]; | unsigned char k[32]; | ||||
int retry; | int retry; | ||||
} secp256k1_rfc6979_hmac_sha256_t; | } secp256k1_rfc6979_hmac_sha256_t; | ||||
static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256_t *rng, const unsigned char *key, size_t keylen); | static void secp256k1_rfc6979_hmac_sha256_initialize(secp256k1_rfc6979_hmac_sha256_t *rng, const unsigned char *key, size_t keylen); | ||||
static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256_t *rng, unsigned char *out, size_t outlen); | static void secp256k1_rfc6979_hmac_sha256_generate(secp256k1_rfc6979_hmac_sha256_t *rng, unsigned char *out, size_t outlen); | ||||
static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256_t *rng); | static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256_t *rng); | ||||
#endif | #endif /* SECP256K1_HASH_H */ |