mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Push for testing of encryption
This commit is contained in:
42
include/my_crypt.h
Normal file
42
include/my_crypt.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// TODO: Add Windows support
|
||||
|
||||
#ifndef MYSYS_MY_CRYPT_H_
|
||||
#define MYSYS_MY_CRYPT_H_
|
||||
|
||||
#include <my_aes.h>
|
||||
|
||||
#if !defined(HAVE_YASSL) && defined(HAVE_OPENSSL)
|
||||
|
||||
#define HAVE_EncryptAes128Ctr
|
||||
|
||||
C_MODE_START
|
||||
Crypt_result my_aes_encrypt_ctr(const uchar* source, uint32 source_length,
|
||||
uchar* dest, uint32* dest_length,
|
||||
const unsigned char* key, uint8 key_length,
|
||||
const unsigned char* iv, uint8 iv_length,
|
||||
uint noPadding);
|
||||
|
||||
Crypt_result my_aes_decrypt_ctr(const uchar* source, uint32 source_length,
|
||||
uchar* dest, uint32* dest_length,
|
||||
const unsigned char* key, uint8 key_length,
|
||||
const unsigned char* iv, uint8 iv_length,
|
||||
uint noPadding);
|
||||
C_MODE_END
|
||||
|
||||
Crypt_result EncryptAes128Ctr(const uchar* key,
|
||||
const uchar* iv, int iv_size,
|
||||
const uchar* plaintext, int plaintext_size,
|
||||
uchar* ciphertext, int* ciphertext_used);
|
||||
|
||||
Crypt_result DecryptAes128Ctr(const uchar* key,
|
||||
const uchar* iv, int iv_size,
|
||||
const uchar* ciphertext, int ciphertext_size,
|
||||
uchar* plaintext, int* plaintext_used);
|
||||
|
||||
#endif /* !defined(HAVE_YASSL) && defined(HAVE_OPENSSL) */
|
||||
|
||||
C_MODE_START
|
||||
Crypt_result my_random_bytes(uchar* buf, int num);
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MYSYS_MY_CRYPT_H_ */
|
Reference in New Issue
Block a user