Compare commits
2 Commits
6bf06a7d3e
...
5cc1484e80
| Author | SHA1 | Date | |
|---|---|---|---|
| 5cc1484e80 | |||
| acf8e5ff03 |
@ -34,7 +34,7 @@ case "$OS" in
|
|||||||
EXEC_FILE="$PROJECT.exe"
|
EXEC_FILE="$PROJECT.exe"
|
||||||
SHARED_LIB_FILE="$PROJECT.dll"
|
SHARED_LIB_FILE="$PROJECT.dll"
|
||||||
INCLUDE="$INCLUDE "
|
INCLUDE="$INCLUDE "
|
||||||
LINKER_LIBS="-lpthread -lws2_32"
|
LINKER_LIBS="-static -lpthread -lws2_32"
|
||||||
;;
|
;;
|
||||||
LINUX)
|
LINUX)
|
||||||
EXEC_FILE="$PROJECT"
|
EXEC_FILE="$PROJECT"
|
||||||
|
|||||||
@ -10,9 +10,9 @@
|
|||||||
// //
|
// //
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#define AESBlockEncryptor_DEFAULT_CLASS (&br_aes_ct64_cbcenc_vtable)
|
#define AESBlockEncryptor_DEFAULT_CLASS (&br_aes_big_cbcenc_vtable)
|
||||||
#define AESBlockDecryptor_DEFAULT_CLASS (&br_aes_ct64_cbcdec_vtable)
|
#define AESBlockDecryptor_DEFAULT_CLASS (&br_aes_big_cbcdec_vtable)
|
||||||
#define AESStream_DEFAULT_CLASS (&br_aes_ct64_ctr_vtable)
|
#define AESStream_DEFAULT_CLASS (&br_aes_big_ctr_vtable)
|
||||||
|
|
||||||
|
|
||||||
//TODO: use PKS#7 instead of this garbage
|
//TODO: use PKS#7 instead of this garbage
|
||||||
@ -30,7 +30,7 @@ typedef struct EncryptedBlockHeader {
|
|||||||
|
|
||||||
typedef struct AESBlockEncryptor {
|
typedef struct AESBlockEncryptor {
|
||||||
const br_block_cbcenc_class* enc_class;
|
const br_block_cbcenc_class* enc_class;
|
||||||
u8 enc_keys[sizeof(br_aes_ct64_cbcenc_keys)];
|
u8 enc_keys[sizeof(br_aes_big_cbcenc_keys)];
|
||||||
u8 buf[__AES_BUFFER_SIZE];
|
u8 buf[__AES_BUFFER_SIZE];
|
||||||
u8 iv[__AES_BLOCK_IV_SIZE];
|
u8 iv[__AES_BLOCK_IV_SIZE];
|
||||||
br_hmac_drbg_context rng_ctx;
|
br_hmac_drbg_context rng_ctx;
|
||||||
@ -54,7 +54,7 @@ Result(u32) AESBlockEncryptor_encrypt(AESBlockEncryptor* ptr, Array(u8) src, Arr
|
|||||||
|
|
||||||
typedef struct AESBlockDecryptor {
|
typedef struct AESBlockDecryptor {
|
||||||
const br_block_cbcdec_class* dec_class;
|
const br_block_cbcdec_class* dec_class;
|
||||||
u8 dec_keys[sizeof(br_aes_ct64_cbcdec_keys)];
|
u8 dec_keys[sizeof(br_aes_big_cbcdec_keys)];
|
||||||
u8 buf[__AES_BUFFER_SIZE];
|
u8 buf[__AES_BUFFER_SIZE];
|
||||||
u8 iv[__AES_BLOCK_IV_SIZE];
|
u8 iv[__AES_BLOCK_IV_SIZE];
|
||||||
} AESBlockDecryptor;
|
} AESBlockDecryptor;
|
||||||
@ -77,7 +77,7 @@ Result(u32) AESBlockDecryptor_decrypt(AESBlockDecryptor* ptr, Array(u8) src, Arr
|
|||||||
|
|
||||||
typedef struct AESStreamEncryptor {
|
typedef struct AESStreamEncryptor {
|
||||||
const br_block_ctr_class* ctr_class;
|
const br_block_ctr_class* ctr_class;
|
||||||
u8 ctr_keys[sizeof(br_aes_ct64_ctr_keys)];
|
u8 ctr_keys[sizeof(br_aes_big_ctr_keys)];
|
||||||
u8 buf[__AES_BUFFER_SIZE];
|
u8 buf[__AES_BUFFER_SIZE];
|
||||||
u8 iv[__AES_STREAM_IV_SIZE];
|
u8 iv[__AES_STREAM_IV_SIZE];
|
||||||
u32 block_counter;
|
u32 block_counter;
|
||||||
@ -102,7 +102,7 @@ Result(u32) AESStreamEncryptor_encrypt(AESStreamEncryptor* ptr, Array(u8) src, A
|
|||||||
|
|
||||||
typedef struct AESStreamDecryptor {
|
typedef struct AESStreamDecryptor {
|
||||||
const br_block_ctr_class* ctr_class;
|
const br_block_ctr_class* ctr_class;
|
||||||
u8 ctr_keys[sizeof(br_aes_ct64_ctr_keys)];
|
u8 ctr_keys[sizeof(br_aes_big_ctr_keys)];
|
||||||
u8 buf[__AES_BUFFER_SIZE];
|
u8 buf[__AES_BUFFER_SIZE];
|
||||||
u8 iv[__AES_STREAM_IV_SIZE];
|
u8 iv[__AES_STREAM_IV_SIZE];
|
||||||
u32 block_counter;
|
u32 block_counter;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user