UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
sha2.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
../shared/ufotypes.h
"
4
5
typedef
struct
{
6
uint64_t
total
[2];
7
uint64_t
state
[8];
8
byte
buffer
[64];
9
}
sha2_context
;
10
14
void
Com_SHA2Starts
(
sha2_context
*ctx);
15
void
Com_SHA2Update
(
sha2_context
*ctx,
const
byte
* input, uint32_t
length
);
16
void
Com_SHA2Finish
(
sha2_context
*ctx,
byte
digest[32]);
17
22
bool
Com_SHA2File
(
const
char
*
filename
,
byte
digest[32]);
23
27
void
Com_SHA2Csum
(
const
byte
*
buf
, uint32_t buflen,
byte
digest[32]);
28
32
void
Com_SHA2Hmac
(
const
byte
*
buf
, uint32_t buflen,
const
byte
*
key
, uint32_t keylen,
byte
digest[32]);
33
34
void
Com_SHA2ToHex
(
const
byte
digest[32],
char
final
[65]);
key
unsigned int key
Definition
cl_input.cpp:64
filename
const char * filename
Definition
ioapi.h:41
buf
voidpf void * buf
Definition
ioapi.h:42
length
QGL_EXTERN GLuint GLsizei GLsizei * length
Definition
r_gl.h:110
Com_SHA2Finish
void Com_SHA2Finish(sha2_context *ctx, byte digest[32])
Definition
sha2.cpp:244
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
sha2.cpp:308
Com_SHA2Update
void Com_SHA2Update(sha2_context *ctx, const byte *input, uint32_t length)
Definition
sha2.cpp:207
Com_SHA2ToHex
void Com_SHA2ToHex(const byte digest[32], char final[65])
Definition
sha2.cpp:301
Com_SHA2Starts
void Com_SHA2Starts(sha2_context *ctx)
Definition
sha2.cpp:62
Com_SHA2File
bool Com_SHA2File(const char *filename, byte digest[32])
Output SHA-256(file contents).
Definition
sha2.cpp:270
Com_SHA2Csum
void Com_SHA2Csum(const byte *buf, uint32_t buflen, byte digest[32])
Output SHA-256(buf).
Definition
sha2.cpp:292
sha2_context
Definition
sha2.h:5
sha2_context::state
uint64_t state[8]
Definition
sha2.h:7
sha2_context::total
uint64_t total[2]
Definition
sha2.h:6
sha2_context::buffer
byte buffer[64]
Definition
sha2.h:8
ufotypes.h
Cross-platform type definitions.
src
common
sha2.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0