4#ifndef RUDIMENTS_ENCRYPTION_H
5#define RUDIMENTS_ENCRYPTION_H
7#include <rudiments/private/encryptionincludes.h>
10enum encryptionerror_t {
11 ENCRYPTION_ERROR_SUCCESS=0,
12 ENCRYPTION_ERROR_NULL,
13 ENCRYPTION_ERROR_INVALID_KEY_SIZE,
14 ENCRYPTION_ERROR_INVALID_IV_SIZE,
15 ENCRYPTION_ERROR_INPUT_TOO_LONG,
16 ENCRYPTION_ERROR_INVALID_PADDING,
17 ENCRYPTION_ERROR_UNSUPPORTED
37 virtual bool setKey(
const byte_t *key,
size_t keysize);
58 virtual bool setIv(
const byte_t *iv,
size_t ivsize);
77 virtual bool append(
const byte_t *data, uint32_t size);
127 #include <rudiments/private/encryption.h>
Definition encryption.h:21
virtual size_t getKeySize()=0
virtual const byte_t * getDecryptedData()=0
virtual bool setKey(const byte_t *key, size_t keysize)
virtual bool append(const byte_t *data, uint32_t size)
virtual size_t getIvSize()=0
virtual encryptionerror_t getError()
virtual void setRandomIv()
virtual uint64_t getEncryptedDataSize()
virtual uint64_t getDecryptedDataSize()
virtual bool setIv(const byte_t *iv, size_t ivsize)
virtual byte_t * getKey()
virtual void setRandomKey()
virtual const byte_t * getEncryptedData()=0