| 179 | } |
| 180 | |
| 181 | cripts::string_view |
| 182 | Crypto::detail::Cipher::Finalize() |
| 183 | { |
| 184 | int len = 0; |
| 185 | |
| 186 | if (!_ctx) { |
| 187 | _initialize(); |
| 188 | } |
| 189 | |
| 190 | EVP_EncryptFinal_ex(_ctx, reinterpret_cast<unsigned char *>(_message.data()) + _length, &len); |
| 191 | _length += len; |
| 192 | _message.resize(_length); |
| 193 | |
| 194 | return _message; |
| 195 | } |
| 196 | |
| 197 | Crypto::AES256 |
| 198 | Crypto::AES256::Encrypt(cripts::string_view str, const unsigned char *key) |