From c31b54fd81690b3df3898437f5865674d06e6577 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 4 Feb 2017 16:23:49 +0100 Subject: tls: fold AES CBC en/decryption into single functions Signed-off-by: Denys Vlasenko --- networking/tls_aes.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'networking/tls_aes.h') diff --git a/networking/tls_aes.h b/networking/tls_aes.h index ea8ed7ea9..c6791866a 100644 --- a/networking/tls_aes.h +++ b/networking/tls_aes.h @@ -6,15 +6,5 @@ * Selected few declarations for AES. */ -int32 psAesInitKey(const unsigned char *key, uint32 keylen, psAesKey_t *skey); -void psAesEncryptBlock(const unsigned char *pt, unsigned char *ct, - psAesKey_t *skey); -void psAesDecryptBlock(const unsigned char *ct, unsigned char *pt, - psAesKey_t *skey); - -int32 psAesInit(psCipherContext_t *ctx, unsigned char *IV, - unsigned char *key, uint32 keylen); -int32 psAesEncrypt(psCipherContext_t *ctx, unsigned char *pt, - unsigned char *ct, uint32 len); -int32 psAesDecrypt(psCipherContext_t *ctx, unsigned char *ct, - unsigned char *pt, uint32 len); +void aes_cbc_encrypt(const void *key, int klen, void *iv, const void *data, size_t len, void *dst); +void aes_cbc_decrypt(const void *key, int klen, void *iv, const void *data, size_t len, void *dst); -- cgit v1.2.3