aboutsummaryrefslogtreecommitdiff
path: root/include/olm/crypto.hh
diff options
context:
space:
mode:
Diffstat (limited to 'include/olm/crypto.hh')
-rw-r--r--include/olm/crypto.hh15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/olm/crypto.hh b/include/olm/crypto.hh
index 484dc83..13fd7e9 100644
--- a/include/olm/crypto.hh
+++ b/include/olm/crypto.hh
@@ -25,23 +25,18 @@
namespace olm {
-static const std::size_t ED25519_PRIVATE_KEY_LENGTH = 64;
-static const std::size_t KEY_LENGTH = 32;
-static const std::size_t SIGNATURE_LENGTH = 64;
-static const std::size_t IV_LENGTH = 16;
-
struct Curve25519PublicKey {
- std::uint8_t public_key[KEY_LENGTH];
+ std::uint8_t public_key[CURVE25519_KEY_LENGTH];
};
struct Curve25519KeyPair : public Curve25519PublicKey {
- std::uint8_t private_key[KEY_LENGTH];
+ std::uint8_t private_key[CURVE25519_KEY_LENGTH];
};
struct Ed25519PublicKey {
- std::uint8_t public_key[KEY_LENGTH];
+ std::uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH];
};
@@ -93,12 +88,12 @@ bool ed25519_verify(
struct Aes256Key {
- std::uint8_t key[KEY_LENGTH];
+ std::uint8_t key[AES256_KEY_LENGTH];
};
struct Aes256Iv {
- std::uint8_t iv[IV_LENGTH];
+ std::uint8_t iv[AES256_IV_LENGTH];
};