10 #include <nlohmann/json.hpp>
30 std::size_t iterations
33 namespace DecryptKeyExportErrorCodes
36 static const std::string FILE_MALFORMED{
"FILE_MALFORMED"};
38 static const std::string VERSION_UNSUPPORTED{
"VERSION_UNSUPPORTED"};
40 static const std::string NOT_JSON{
"NOT_JSON"};
42 static const std::string HMAC_FAILED{
"HMAC_FAILED"};
Definition: location.hpp:10
std::pair< ByteArray, ByteArray > deriveKeyExportKey(std::string password, ByteArray salt, std::size_t iterations)
Derive the key-export key from the user-inputted password.
Definition: key-export.cpp:29
Maybe< nlohmann::json > decryptKeyExport(std::string exportContent, std::string password)
Decrypt the key-export file with the user-inputted password.
Definition: key-export.cpp:81
std::vector< unsigned char > ByteArray
Definition: crypto-util.hpp:21