libosmogsm 1.11.0.26-c59d.202505152026
Osmocom GSM library
Loading...
Searching...
No Matches
sha256_i.h File Reference

Go to the source code of this file.

Data Structures

struct  sha256_state
 

Macros

#define SHA256_BLOCK_SIZE   64
 

Functions

void sha256_init (struct sha256_state *md)
 
int sha256_process (struct sha256_state *md, const unsigned char *in, unsigned long inlen)
 Process a block of memory though the hash.
 
int sha256_done (struct sha256_state *md, unsigned char *out)
 Terminate the hash to get the digest.
 

Macro Definition Documentation

◆ SHA256_BLOCK_SIZE

#define SHA256_BLOCK_SIZE   64

Function Documentation

◆ sha256_done()

int sha256_done ( struct sha256_state md,
unsigned char out 
)

Terminate the hash to get the digest.

Parameters
mdThe hash state
out[out] The destination of the hash (32 bytes)
Returns
CRYPT_OK if successful

References len, SHA256_BLOCK_SIZE, sha256_compress(), WPA_PUT_BE32, and WPA_PUT_BE64.

Referenced by sha256_vector().

◆ sha256_init()

void sha256_init ( struct sha256_state md)

References len.

Referenced by sha256_vector().

◆ sha256_process()

int sha256_process ( struct sha256_state md,
const unsigned char in,
unsigned long  inlen 
)

Process a block of memory though the hash.

Parameters
mdThe hash state
inThe data to hash
inlenThe length of the data (octets)
Returns
CRYPT_OK if successful

References len, MIN, n, os_memcpy, SHA256_BLOCK_SIZE, and sha256_compress().

Referenced by sha256_vector().