Add source code for ctrtool

This commit is contained in:
jakcron
2022-03-12 16:00:33 +08:00
parent 6ad2f13c50
commit 800f5776bc
681 changed files with 219734 additions and 0 deletions
@@ -0,0 +1,15 @@
#include <tc/crypto/Aes192CbcEncryptor.h>
void tc::crypto::EncryptAes192Cbc(byte_t* dst, const byte_t* src, size_t size, const byte_t* key, size_t key_size, const byte_t* iv, size_t iv_size)
{
tc::crypto::Aes192CbcEncryptor crypt;
crypt.initialize(key, key_size, iv, iv_size);
crypt.encrypt(dst, src, size);
}
void tc::crypto::DecryptAes192Cbc(byte_t* dst, const byte_t* src, size_t size, const byte_t* key, size_t key_size, const byte_t* iv, size_t iv_size)
{
tc::crypto::Aes192CbcEncryptor crypt;
crypt.initialize(key, key_size, iv, iv_size);
crypt.decrypt(dst, src, size);
}