53 const byte *keyBytes,
size_t keyLen,
54 const byte *initVectorBytes,
size_t initVectorLen,
55 const byte *aadBytes,
size_t aadLen,
74 const byte *keyBytes,
size_t keyLen,
75 const byte *initVectorBytes,
size_t initVectorLen,
76 const byte *aadBytes,
size_t aadLen,
DYNXX_EXTERN_C_BEGIN const byte * dynxx_crypto_rand(size_t len)
Generate random bytes.
const byte * dynxx_crypto_hash_md5(const byte *inBytes, size_t inLen, DYNXX_OUT size_t *outLen)
MD5 hash.
const byte * dynxx_crypto_base64_encode(const byte *inBytes, size_t inLen, bool noNewLines, DYNXX_OUT size_t *outLen)
Base64 encode.
const byte * dynxx_crypto_aes_encrypt(const byte *inBytes, size_t inLen, const byte *keyBytes, size_t keyLen, DYNXX_OUT size_t *outLen)
AES Encrypt.
const byte * dynxx_crypto_hash_sha1(const byte *inBytes, size_t inLen, DYNXX_OUT size_t *outLen)
SHA1.
const byte * dynxx_crypto_aes_gcm_decrypt(const byte *inBytes, size_t inLen, const byte *keyBytes, size_t keyLen, const byte *initVectorBytes, size_t initVectorLen, const byte *aadBytes, size_t aadLen, size_t tagBits, DYNXX_OUT size_t *outLen)
AES GCM Decrypt.
const byte * dynxx_crypto_base64_decode(const byte *inBytes, size_t inLen, bool noNewLines, DYNXX_OUT size_t *outLen)
Base64 decode.
const byte * dynxx_crypto_rsa_encrypt(const byte *inBytes, size_t inLen, const byte *keyBytes, size_t keyLen, DynXXCryptoRSAPadding padding, DYNXX_OUT size_t *outLen)
RSA Encrypt.
const byte * dynxx_crypto_rsa_decrypt(const byte *inBytes, size_t inLen, const byte *keyBytes, size_t keyLen, DynXXCryptoRSAPadding padding, DYNXX_OUT size_t *outLen)
RSA Decrypt.
const byte * dynxx_crypto_aes_gcm_encrypt(const byte *inBytes, size_t inLen, const byte *keyBytes, size_t keyLen, const byte *initVectorBytes, size_t initVectorLen, const byte *aadBytes, size_t aadLen, size_t tagBits, DYNXX_OUT size_t *outLen)
AES GCM Encrypt.
DynXXCryptoRSAPadding
RSA padding.
Definition Crypto.h:83
@ DynXXCryptoRSAPaddingSSLV23
Definition Crypto.h:85
@ DynXXCryptoRSAPaddingNO
Definition Crypto.h:86
@ DynXXCryptoRSAPaddingPKCS1_OAEP
Definition Crypto.h:87
@ DynXXCryptoRSAPaddingPKCS1_PSS
Definition Crypto.h:89
@ DynXXCryptoRSAPaddingPKCS1
Definition Crypto.h:84
@ DynXXCryptoRSAPaddingX931
Definition Crypto.h:88
const char * dynxx_crypto_rsa_gen_key(const char *base64, bool isPublic)
const byte * dynxx_crypto_aes_decrypt(const byte *inBytes, size_t inLen, const byte *keyBytes, size_t keyLen, DYNXX_OUT size_t *outLen)
AES Decrypt.
const byte * dynxx_crypto_hash_sha256(const byte *inBytes, size_t inLen, DYNXX_OUT size_t *outLen)
SHA256.
#define DYNXX_EXTERN_C_BEGIN
Definition Macro.h:13
#define DYNXX_EXTERN_C_END
Definition Macro.h:14
#define DYNXX_OUT
Definition Macro.h:38