|
ORE Studio 0.0.4
|
AES-256-GCM encryption service. More...
#include <encryption.hpp>

Static Public Member Functions | |
| static std::string | encrypt (const std::string &plaintext, const std::string &password) |
| Encrypt plaintext using a password. | |
| static std::string | decrypt (const std::string &encrypted_data, const std::string &password) |
| Decrypt ciphertext using a password. | |
| static bool | verify_password (const std::string &encrypted_data, const std::string &password) |
| Verify if a password can decrypt the given data. | |
AES-256-GCM encryption service.
Provides secure encryption and decryption using AES-256-GCM with a key derived from a password using PBKDF2.
The encrypted format is: base64(salt || iv || tag || ciphertext)
|
static |
Encrypt plaintext using a password.
| plaintext | The text to encrypt. |
| password | The password used to derive the encryption key. |

|
static |
Decrypt ciphertext using a password.
| encrypted_data | Base64-encoded encrypted data. |
| password | The password used to derive the decryption key. |
| std::runtime_error | if decryption fails. |

|
static |
Verify if a password can decrypt the given data.
| encrypted_data | Base64-encoded encrypted data. |
| password | The password to verify. |
