|
Marine Library
1.0
C++ library for Linux Networking Development
|
A convenient interface for Advanced Encryption Standard (AES) algorithm. More...
#include <encrypt_aes.hh>
Public Types | |
| enum | EKeyIntensity { L128 = 128, L192 = 192, L256 = 256 } |
| Key sizes. | |
Public Member Functions | ||||||||||
| CEncryptorAes () | ||||||||||
| Construct a default object. More... | ||||||||||
| CEncryptorAes (const std::string &key, EKeyIntensity intensity) | ||||||||||
| Construct an object. More... | ||||||||||
| void | setIntensity (EKeyIntensity intensity) | |||||||||
| Set key size. More... | ||||||||||
| void | setKey (const std::string &key) | |||||||||
| Set encryption key (password). More... | ||||||||||
| void | setKeyAndIntensity (const std::string &key, EKeyIntensity intensity) | |||||||||
| Set encryption key (password) and key size. More... | ||||||||||
Encryption | ||||||||||
Encrypt given data. If
| ||||||||||
| int | encrypt (const std::vector< char > &input, std::vector< char > &output, size_t from=0) const | |||||||||
| int | encrypt (const std::vector< signed char > &input, std::vector< signed char > &output, size_t from=0) const | |||||||||
| int | encrypt (const std::vector< unsigned char > &input, std::vector< unsigned char > &output, size_t from=0) const | |||||||||
| int | encrypt (const std::string &input, std::string &output, size_t from=0) const | |||||||||
Decryption | ||||||||||
Decrypt given data. If
| ||||||||||
| int | decrypt (const std::vector< char > &input, std::vector< char > &output, size_t from=0) const | |||||||||
| int | decrypt (const std::vector< signed char > &input, std::vector< signed char > &output, size_t from=0) const | |||||||||
| int | decrypt (const std::vector< unsigned char > &input, std::vector< unsigned char > &output, size_t from=0) const | |||||||||
| int | decrypt (const std::string &input, std::string &output, size_t from=0) const | |||||||||
A convenient interface for Advanced Encryption Standard (AES) algorithm.
|
inline |
Construct a default object.
Key size defaults to L128.
You need setKey or setKeyAndIntensity before encryption/decryption operations.
|
inline |
Construct an object.
| key | Encryption key (password) |
| intensity | Key size |
|
inline |
Set key size.
| intensity | Key size |
|
inline |
Set encryption key (password).
Password is an arbitrary string.
| key | Encryption key (password) |
|
inline |
Set encryption key (password) and key size.
Password is an arbitrary string.
| key | Encryption key (password) |
| intensity | Key size |
1.8.11