UFO: Alien Invasion
|
#include "../shared/ufotypes.h"
Go to the source code of this file.
Data Structures | |
struct | sha2_context |
Functions | |
void | Com_SHA2Starts (sha2_context *ctx) |
void | Com_SHA2Update (sha2_context *ctx, const byte *input, uint32_t length) |
void | Com_SHA2Finish (sha2_context *ctx, byte digest[32]) |
bool | Com_SHA2File (const char *filename, byte digest[32]) |
Output SHA-256(file contents) More... | |
void | Com_SHA2Csum (const byte *buf, uint32_t buflen, byte digest[32]) |
Output SHA-256(buf) More... | |
void | Com_SHA2Hmac (const byte *buf, uint32_t buflen, const byte *key, uint32_t keylen, byte digest[32]) |
Output HMAC-SHA-256(buf,key) More... | |
void | Com_SHA2ToHex (const byte digest[32], char final[65]) |
Output SHA-256(buf)
Definition at line 292 of file sha2.cpp.
References Com_SHA2Finish(), Com_SHA2Starts(), and Com_SHA2Update().
Referenced by TEST_F().
bool Com_SHA2File | ( | const char * | filename, |
byte | digest[32] | ||
) |
Output SHA-256(file contents)
true
if successful Definition at line 270 of file sha2.cpp.
References Com_SHA2Finish(), Com_SHA2Starts(), Com_SHA2Update(), f, FILE_READ, FS_OpenFile(), and FS_Read().
void Com_SHA2Finish | ( | sha2_context * | ctx, |
byte | digest[32] | ||
) |
Definition at line 244 of file sha2.cpp.
References Com_SHA2Update(), PUT_UINT32_BE, sha2_padding, sha2_context::state, and sha2_context::total.
Referenced by Com_SHA2Csum(), Com_SHA2File(), and Com_SHA2Hmac().
void Com_SHA2Hmac | ( | const byte * | buf, |
uint32_t | buflen, | ||
const byte * | key, | ||
uint32_t | keylen, | ||
byte | digest[32] | ||
) |
Output HMAC-SHA-256(buf,key)
Definition at line 308 of file sha2.cpp.
References Com_SHA2Finish(), Com_SHA2Starts(), Com_SHA2Update(), and i.
void Com_SHA2Starts | ( | sha2_context * | ctx | ) |
Core SHA-256 functions
Definition at line 62 of file sha2.cpp.
References sha2_context::state, and sha2_context::total.
Referenced by Com_SHA2Csum(), Com_SHA2File(), and Com_SHA2Hmac().
void Com_SHA2Update | ( | sha2_context * | ctx, |
const byte * | input, | ||
uint32_t | length | ||
) |
Definition at line 207 of file sha2.cpp.
References sha2_context::buffer, Com_SHA2Process(), length, and sha2_context::total.
Referenced by Com_SHA2Csum(), Com_SHA2File(), Com_SHA2Finish(), and Com_SHA2Hmac().