54 if (!
data || !size || !out)
73 for (
int i = 0; i !=
padsize; i++)
88 const unsigned char*
prev = iv;
90 if (!
data || !size || !out)
109 unsigned char padsize = *--out;
125 : enc(key), pad(
padIn)
142 : dec(key), pad(
padIn)
static int CBCEncrypt(const T &enc, const unsigned char iv[AES_BLOCKSIZE], const unsigned char *data, int size, bool pad, unsigned char *out)
static int CBCDecrypt(const T &dec, const unsigned char iv[AES_BLOCKSIZE], const unsigned char *data, int size, bool pad, unsigned char *out)
constexpr int AES_BLOCKSIZE
constexpr int AES256_KEYSIZE
AES256CBCDecrypt(const unsigned char key[AES256_KEYSIZE], const unsigned char ivIn[AES_BLOCKSIZE], bool padIn)
int Decrypt(const unsigned char *data, int size, unsigned char *out) const
secure_allocator< unsigned char > allocator
AES256CBCEncrypt(const unsigned char key[AES256_KEYSIZE], const unsigned char ivIn[AES_BLOCKSIZE], bool padIn)
int Encrypt(const unsigned char *data, int size, unsigned char *out) const
secure_allocator< unsigned char > allocator
secure_allocator< AES256_ctx > allocator
AES256Decrypt(const unsigned char key[32])
void Decrypt(unsigned char plaintext[16], const unsigned char ciphertext[16]) const
secure_allocator< AES256_ctx > allocator
AES256Encrypt(const unsigned char key[32])
void Encrypt(unsigned char ciphertext[16], const unsigned char plaintext[16]) const
static const PrecomputedData data
Precomputed COutPoint and CCoins values.
void AES256_encrypt(const AES256_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
void AES256_init(AES256_ctx *ctx, const unsigned char *key32)
void AES256_decrypt(const AES256_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
#define T(expected, seed, data)
T * allocate(std::size_t n)
void deallocate(T *p, std::size_t n)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.