| 164 | } |
| 165 | |
| 166 | void |
| 167 | Crypto::detail::Cipher::Encrypt(cripts::string_view str) |
| 168 | { |
| 169 | int len = 0; |
| 170 | |
| 171 | if (!_ctx) { |
| 172 | _initialize(); |
| 173 | } |
| 174 | |
| 175 | _message.resize(_length + str.size() + AES_BLOCK_SIZE + 1); |
| 176 | EVP_EncryptUpdate(_ctx, reinterpret_cast<unsigned char *>(_message.data()) + _length, &len, (unsigned char *)str.data(), |
| 177 | str.size()); |
| 178 | _length += len; |
| 179 | } |
| 180 | |
| 181 | cripts::string_view |
| 182 | Crypto::detail::Cipher::Finalize() |