1#ifndef CRYPTICAL_ENVELOPMENT_CLASS
2#define CRYPTICAL_ENVELOPMENT_CLASS
A very common template for a dynamic array of bytes.
Root object for any class that knows its own name.
DEFINE_CLASS_NAME("cryptical_envelopment")
virtual int minimum_key_size_in_bits() const =0
returns the minimum key size in bits supported here.
bool set_key(int key_size)
this will create a new random key of the "key_size", in bits.
bool encrypt(const basis::byte_array &source, basis::byte_array &target) const
encrypts the "source" array into the "target" array.
virtual int maximum_key_size_in_bits() const =0
returns the maximum key size in bits supported here.
bool decrypt(const basis::byte_array &source, basis::byte_array &target) const
decrypts the "target" array from the encrypted "source" array.
virtual ~cryptical_envelopment()
bool generate_key(int size, basis::byte_array &new_key)
creates a "new_key" of the "size" (in bits) specified.
cryptical_envelopment & operator=(const cryptical_envelopment &to_copy)
static const basis::byte_array & init_vector()
returns the initialization vector that is used by this class.
const basis::byte_array & get_key() const
returns our current key.
struct evp_cipher_st EVP_CIPHER