diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/PasswordHash.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -5,6 +5,8 @@ It is designed to use less bandwidth over speed. Data is signed using ed25519, encrypted using xchacha20-poly1305 ietf and hashed using Blake2b. See src/Encryption.cpp, src/Signature.cpp and src/Hash.cpp. Also check Scheme.md for packet construction. +## Password +Data is stored encrypted on disk by using the hash of the user password. The password is hashed using Argon2i. # Limits Only 800kb of data can be used for each `add`. You can add more data by using `add` several times. diff --git a/src/PasswordHash.cpp b/src/PasswordHash.cpp index b757583..f877d20 100644 --- a/src/PasswordHash.cpp +++ b/src/PasswordHash.cpp @@ -14,7 +14,7 @@ namespace odhtdb result.data = new uint8_t[HASH_PASSWORD_LENGTH]; result.size = HASH_PASSWORD_LENGTH; - if(argon2d_hash_raw(tCost, mCost, parallelism, plainPassword.data, plainPassword.size, salt.data, salt.size, result.data, HASH_PASSWORD_LENGTH) != ARGON2_OK) + if(argon2i_hash_raw(tCost, mCost, parallelism, plainPassword.data, plainPassword.size, salt.data, salt.size, result.data, HASH_PASSWORD_LENGTH) != ARGON2_OK) throw std::runtime_error("Failed to hash password"); return result; |