Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00032
00033 #pragma once
00034
00035 #include "../api_core.h"
00036 #include "../System/sharedptr.h"
00037
00038 class CL_DataBuffer;
00039 class CL_AES256_Encrypt_Impl;
00040
00044 class CL_API_CORE CL_AES256_Encrypt
00045 {
00048
00049 public:
00051 CL_AES256_Encrypt();
00052
00056
00057 public:
00063 CL_DataBuffer get_data() const;
00064
00068
00069 public:
00070 static const int iv_size = 16;
00071 static const int key_size = 32;
00072 static const int block_size = 16;
00073
00075 void reset();
00076
00081 void set_iv(const unsigned char iv[iv_size]);
00082
00086 void set_key(const unsigned char key[key_size]);
00087
00096 void set_padding(bool value = true, bool use_pkcs7 = true, unsigned int num_additional_padded_blocks = 0);
00097
00099 void add(const void *data, int size);
00100
00104 void add(const CL_DataBuffer &data);
00105
00107 void calculate();
00108
00112
00113 private:
00114 CL_SharedPtr<CL_AES256_Encrypt_Impl> impl;
00116 };
00117