libosmogsm 1.9.0.196-9975
Osmocom GSM library
sha256_i.h
Go to the documentation of this file.
1/*
2 * SHA-256 internal definitions
3 * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15#ifndef SHA256_I_H
16#define SHA256_I_H
17
18#define SHA256_BLOCK_SIZE 64
19
24};
25
26void sha256_init(struct sha256_state *md);
27int sha256_process(struct sha256_state *md, const unsigned char *in,
28 unsigned long inlen);
29int sha256_done(struct sha256_state *md, unsigned char *out);
30
31#endif /* SHA256_I_H */
uint64_t u64
Definition: common.h:24
uint8_t u8
Definition: common.h:27
uint32_t u32
Definition: common.h:25
int sha256_done(struct sha256_state *md, unsigned char *out)
Terminate the hash to get the digest.
Definition: sha256-internal.c:190
#define SHA256_BLOCK_SIZE
Definition: sha256_i.h:18
void sha256_init(struct sha256_state *md)
Definition: sha256-internal.c:129
int sha256_process(struct sha256_state *md, const unsigned char *in, unsigned long inlen)
Process a block of memory though the hash.
Definition: sha256-internal.c:150
Definition: sha256_i.h:20
u32 curlen
Definition: sha256_i.h:22
u32 state[8]
Definition: sha256_i.h:22
u8 buf[SHA256_BLOCK_SIZE]
Definition: sha256_i.h:23
u64 length
Definition: sha256_i.h:21