165 #ifdef USE_32BIT_ONLY 243 unsigned int bytecount);
245 unsigned int bit_count);
251 unsigned int bytecount);
253 unsigned int bit_count);
260 unsigned int bytecount);
262 unsigned int bit_count);
269 unsigned int bytecount);
271 unsigned int bit_count);
278 unsigned int bytecount);
280 unsigned int bit_count);
287 const uint8_t *bytes,
unsigned int bytecount);
289 uint8_t bits,
unsigned int bit_count);
303 const unsigned char *
text,
305 const unsigned char *key,
315 const unsigned char *key,
int key_len);
319 unsigned int bit_count);
328 int salt_len,
const unsigned char *ikm,
int ikm_len,
329 const unsigned char *
info,
int info_len,
330 uint8_t okm[ ],
int okm_len);
332 int salt_len,
const unsigned char *ikm,
335 int prk_len,
const unsigned char *
info,
336 int info_len, uint8_t okm[ ],
int okm_len);
344 const unsigned char *salt,
int salt_len);
348 unsigned int ikm_bit_count);
351 const unsigned char *
info,
int info_len,
352 uint8_t okm[USHAMaxHashSize],
int okm_len);
364 #ifndef USE_MODIFIED_MACROS 365 #define SHA_Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) 366 #define SHA_Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) 372 #define SHA_Ch(x, y, z) (((x) & ((y) ^ (z))) ^ (z)) 373 #define SHA_Maj(x, y, z) (((x) & ((y) | (z))) | ((y) & (z))) 377 #define SHA_Parity(x, y, z) ((x) ^ (y) ^ (z))
int SHA256Result(SHA256Context *, uint8_t Message_Digest[SHA256HashSize])
uint32_t Intermediate_Hash[SHA1HashSize/4]
int_least16_t Message_Block_Index
int hkdfExtract(SHAversion whichSha, const unsigned char *salt, int salt_len, const unsigned char *ikm, int ikm_len, uint8_t prk[USHAMaxHashSize])
SHA256Context sha256Context
int hmacFinalBits(HMACContext *context, uint8_t bits, unsigned int bit_count)
int hmacReset(HMACContext *context, enum SHAversion whichSha, const unsigned char *key, int key_len)
int SHA512FinalBits(SHA512Context *, uint8_t bits, unsigned int bit_count)
SHA512Context sha512Context
int hmacResult(HMACContext *context, uint8_t digest[USHAMaxHashSize])
int SHA224FinalBits(SHA224Context *, uint8_t bits, unsigned int bit_count)
int SHA224Input(SHA224Context *, const uint8_t *bytes, unsigned int bytecount)
int hkdfReset(HKDFContext *context, enum SHAversion whichSha, const unsigned char *salt, int salt_len)
int SHA1FinalBits(SHA1Context *, uint8_t bits, unsigned int bit_count)
SHA1FinalBits Add in any final bits of the message.
int SHA256FinalBits(SHA256Context *, uint8_t bits, unsigned int bit_count)
struct SHA512Context SHA512Context
int hkdfInput(HKDFContext *context, const unsigned char *ikm, int ikm_len)
struct SHA1Context SHA1Context
int USHAReset(USHAContext *context, SHAversion whichSha)
int hkdfFinalBits(HKDFContext *context, uint8_t ikm_bits, unsigned int ikm_bit_count)
int SHA256Input(SHA256Context *, const uint8_t *bytes, unsigned int bytecount)
struct HKDFContext HKDFContext
int USHAInput(USHAContext *context, const uint8_t *bytes, unsigned int bytecount)
int SHA224Reset(SHA224Context *)
int_least16_t Message_Block_Index
int hmac(SHAversion whichSha, const unsigned char *text, int text_len, const unsigned char *key, int key_len, uint8_t digest[USHAMaxHashSize])
int SHA384Result(SHA384Context *, uint8_t Message_Digest[SHA384HashSize])
int USHABlockSize(enum SHAversion whichSha)
int_least16_t Message_Block_Index
int hmacInput(HMACContext *context, const unsigned char *text, int text_len)
int USHAHashSizeBits(enum SHAversion whichSha)
int SHA384Reset(SHA384Context *)
int hkdfExpand(SHAversion whichSha, const uint8_t prk[], int prk_len, const unsigned char *info, int info_len, uint8_t okm[], int okm_len)
struct SHA256Context SHA256Context
int USHAResult(USHAContext *context, uint8_t Message_Digest[USHAMaxHashSize])
int hkdf(SHAversion whichSha, const unsigned char *salt, int salt_len, const unsigned char *ikm, int ikm_len, const unsigned char *info, int info_len, uint8_t okm[], int okm_len)
struct HMACContext HMACContext
int hkdfResult(HKDFContext *context, uint8_t prk[USHAMaxHashSize], const unsigned char *info, int info_len, uint8_t okm[USHAMaxHashSize], int okm_len)
uint8_t Message_Block[SHA1_Message_Block_Size]
const char * USHAHashName(enum SHAversion whichSha)
struct USHAContext USHAContext
int SHA1Result(SHA1Context *, uint8_t Message_Digest[SHA1HashSize])
int SHA512Reset(SHA512Context *)
int SHA384Input(SHA384Context *, const uint8_t *bytes, unsigned int bytecount)
int SHA256Reset(SHA256Context *)
int SHA224Result(SHA224Context *, uint8_t Message_Digest[SHA224HashSize])
static char context[AST_MAX_CONTEXT]
int USHAHashSize(enum SHAversion whichSha)
int SHA1Reset(SHA1Context *)
SHA1Reset.
int SHA512Result(SHA512Context *, uint8_t Message_Digest[SHA512HashSize])
int USHAFinalBits(USHAContext *context, uint8_t bits, unsigned int bit_count)
int SHA512Input(SHA512Context *, const uint8_t *bytes, unsigned int bytecount)
int SHA384FinalBits(SHA384Context *, uint8_t bits, unsigned int bit_count)
int SHA1Input(SHA1Context *, const uint8_t *bytes, unsigned int bytecount)