Symmetric crypto utility definitions. More...
#include <string>

Go to the source code of this file.
Functions | |
| std::string | Dwm::Auth::SymCrypto::Encrypt (const std::string &keystr, const std::string &ivstr, const std::string &plaintext) |
Encrypts the given plaintext using AES. More... | |
| std::string | Dwm::Auth::SymCrypto::Encrypt (const std::string &keystr, const std::string &ivstr, const uint8_t *plaintext, size_t plaintextLen) |
Encrypts the given plantextLen bytes of plaintext using AES. More... | |
| std::string | Dwm::Auth::SymCrypto::Decrypt (const std::string &keystr, const std::string &ivstr, const std::string &ciphertext) |
Decrypts the given ciphertext using AES. More... | |
Symmetric crypto utility definitions.
| std::string Dwm::Auth::SymCrypto::Decrypt | ( | const std::string & | keystr, |
| const std::string & | ivstr, | ||
| const std::string & | ciphertext | ||
| ) |
Decrypts the given ciphertext using AES.
keystr is ideally 16 bytes long. If shorter, we will pad to 16 bytes by repeating the contents of keystr starting at index 0. ivstr is ideally 16 bytes long. If shorter, we will pad to 16 bytes by repeating the contents of ivstr starting at index 0. Returns the decrypted string.
| std::string Dwm::Auth::SymCrypto::Encrypt | ( | const std::string & | keystr, |
| const std::string & | ivstr, | ||
| const std::string & | plaintext | ||
| ) |
Encrypts the given plaintext using AES.
keystr is ideally 16 bytes long. If shorter, we will pad to 16 bytes by repeating the contents of keystr starting at index 0. ivstr is ideally 16 bytes long. If shorter, we will pad to 16 bytes by repeating the contents of ivstr starting at index 0. Returns the encrypted string.
| std::string Dwm::Auth::SymCrypto::Encrypt | ( | const std::string & | keystr, |
| const std::string & | ivstr, | ||
| const uint8_t * | plaintext, | ||
| size_t | plaintextLen | ||
| ) |
Encrypts the given plantextLen bytes of plaintext using AES.
keystr is ideally 16 bytes long. If shorter, we will pad to 16 bytes by repeating the contents of keystr starting at index 0. ivstr is ideally 16 bytes long. If shorter, we will pad to 16 bytes by repeating the contents of ivstr starting at index 0. Returns the encrypted string.