Fabcoin Core
0.16.2
P2P Digital Currency
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
src
secp256k1
src
hash.h
Go to the documentation of this file.
1
/**********************************************************************
2
* Copyright (c) 2014 Pieter Wuille *
3
* Distributed under the MIT software license, see the accompanying *
4
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
5
**********************************************************************/
6
7
#ifndef SECP256K1_HASH_H
8
#define SECP256K1_HASH_H
9
10
#include <stdlib.h>
11
#include <stdint.h>
12
13
typedef
struct
{
14
uint32_t s[8];
15
uint32_t buf[16];
/* In big endian */
16
size_t
bytes
;
17
}
secp256k1_sha256_t
;
18
19
static
void
secp256k1_sha256_initialize(
secp256k1_sha256_t
*hash);
20
static
void
secp256k1_sha256_write(
secp256k1_sha256_t
*hash,
const
unsigned
char
*
data
,
size_t
size
);
21
static
void
secp256k1_sha256_finalize(
secp256k1_sha256_t
*hash,
unsigned
char
*out32);
22
23
typedef
struct
{
24
secp256k1_sha256_t
inner,
outer
;
25
}
secp256k1_hmac_sha256_t
;
26
27
static
void
secp256k1_hmac_sha256_initialize(
secp256k1_hmac_sha256_t
*hash,
const
unsigned
char
*key,
size_t
size
);
28
static
void
secp256k1_hmac_sha256_write(
secp256k1_hmac_sha256_t
*hash,
const
unsigned
char
*
data
,
size_t
size
);
29
static
void
secp256k1_hmac_sha256_finalize(
secp256k1_hmac_sha256_t
*hash,
unsigned
char
*out32);
30
31
typedef
struct
{
32
unsigned
char
v[32];
33
unsigned
char
k[32];
34
int
retry
;
35
}
secp256k1_rfc6979_hmac_sha256_t
;
36
37
static
void
secp256k1_rfc6979_hmac_sha256_initialize(
secp256k1_rfc6979_hmac_sha256_t
*rng,
const
unsigned
char
*key,
size_t
keylen);
38
static
void
secp256k1_rfc6979_hmac_sha256_generate(
secp256k1_rfc6979_hmac_sha256_t
*rng,
unsigned
char
*out,
size_t
outlen);
39
static
void
secp256k1_rfc6979_hmac_sha256_finalize(
secp256k1_rfc6979_hmac_sha256_t
*rng);
40
41
#endif
/* SECP256K1_HASH_H */
secp256k1_hmac_sha256_t::outer
secp256k1_sha256_t outer
Definition:
hash.h:24
secp256k1_rfc6979_hmac_sha256_t
Definition:
hash.h:31
secp256k1_sha256_t
Definition:
hash.h:13
secp256k1_sha256_t::bytes
size_t bytes
Definition:
hash.h:16
size
uint8_t const size_t const size
Definition:
sha3.h:20
secp256k1_hmac_sha256_t
Definition:
hash.h:23
secp256k1_rfc6979_hmac_sha256_t::retry
int retry
Definition:
hash.h:34
data
uint8_t const * data
Definition:
sha3.h:19
Generated on Mon Oct 22 2018 15:15:34 for Fabcoin Core by
1.8.11