diff --git a/fhmqv.h b/fhmqv.h
index 103eeda0..52951542 100644
--- a/fhmqv.h
+++ b/fhmqv.h
@@ -201,7 +201,7 @@ public:
memcpy(publicKey, privateKey+StaticPrivateKeyLength(), EphemeralPublicKeyLength());
}
- /// \brief Derive shared secre from your private keys and couterparty's public keys
+ /// \brief Derive shared secret from your private keys and couterparty's public keys
/// \param agreedValue the shared secret
/// \param staticPrivateKey your long term private key
/// \param ephemeralPrivateKey your ephemeral private key
@@ -216,11 +216,11 @@ public:
/// static public key is validated. If you have previously validated the
/// couterparty's static public key, then use
/// validateStaticOtherPublicKey=false to save time.
- /// \pre size of agreedValue == AgreedValueLength()
- /// \pre length of staticPrivateKey == StaticPrivateKeyLength()
- /// \pre length of ephemeralPrivateKey == EphemeralPrivateKeyLength()
- /// \pre length of staticOtherPublicKey == StaticPublicKeyLength()
- /// \pre length of ephemeralOtherPublicKey == EphemeralPublicKeyLength()
+ /// \pre COUNTOF(agreedValue) == AgreedValueLength()
+ /// \pre COUNTOF(staticPrivateKey) == StaticPrivateKeyLength()
+ /// \pre COUNTOF(ephemeralPrivateKey) == EphemeralPrivateKeyLength()
+ /// \pre COUNTOF(staticOtherPublicKey) == StaticPublicKeyLength()
+ /// \pre COUNTOF(ephemeralOtherPublicKey) == EphemeralPublicKeyLength()
bool Agree(byte *agreedValue,
const byte *staticPrivateKey, const byte *ephemeralPrivateKey,
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
diff --git a/hmqv.h b/hmqv.h
index 34b2028b..026fe9ef 100644
--- a/hmqv.h
+++ b/hmqv.h
@@ -200,7 +200,7 @@ public:
memcpy(publicKey, privateKey+StaticPrivateKeyLength(), EphemeralPublicKeyLength());
}
- /// \brief Derive shared secre from your private keys and couterparty's public keys
+ /// \brief Derive shared secret from your private keys and couterparty's public keys
/// \param agreedValue the shared secret
/// \param staticPrivateKey your long term private key
/// \param ephemeralPrivateKey your ephemeral private key
@@ -215,11 +215,11 @@ public:
/// static public key is validated. If you have previously validated the
/// couterparty's static public key, then use
/// validateStaticOtherPublicKey=false to save time.
- /// \pre size of agreedValue == AgreedValueLength()
- /// \pre length of staticPrivateKey == StaticPrivateKeyLength()
- /// \pre length of ephemeralPrivateKey == EphemeralPrivateKeyLength()
- /// \pre length of staticOtherPublicKey == StaticPublicKeyLength()
- /// \pre length of ephemeralOtherPublicKey == EphemeralPublicKeyLength()
+ /// \pre COUNTOF(agreedValue) == AgreedValueLength()
+ /// \pre COUNTOF(staticPrivateKey) == StaticPrivateKeyLength()
+ /// \pre COUNTOF(ephemeralPrivateKey) == EphemeralPrivateKeyLength()
+ /// \pre COUNTOF(staticOtherPublicKey) == StaticPublicKeyLength()
+ /// \pre COUNTOF(ephemeralOtherPublicKey) == EphemeralPublicKeyLength()
bool Agree(byte *agreedValue,
const byte *staticPrivateKey, const byte *ephemeralPrivateKey,
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
diff --git a/mqv.h b/mqv.h
index fbcccd48..f2364207 100644
--- a/mqv.h
+++ b/mqv.h
@@ -161,7 +161,7 @@ public:
memcpy(publicKey, privateKey+StaticPrivateKeyLength(), EphemeralPublicKeyLength());
}
- /// \brief Derive shared secre from your private keys and couterparty's public keys
+ /// \brief Derive shared secret from your private keys and couterparty's public keys
/// \param agreedValue the shared secret
/// \param staticPrivateKey your long term private key
/// \param ephemeralPrivateKey your ephemeral private key
@@ -176,11 +176,11 @@ public:
/// static public key is validated. If you have previously validated the
/// couterparty's static public key, then use
/// validateStaticOtherPublicKey=false to save time.
- /// \pre size of agreedValue == AgreedValueLength()
- /// \pre length of staticPrivateKey == StaticPrivateKeyLength()
- /// \pre length of ephemeralPrivateKey == EphemeralPrivateKeyLength()
- /// \pre length of staticOtherPublicKey == StaticPublicKeyLength()
- /// \pre length of ephemeralOtherPublicKey == EphemeralPublicKeyLength()
+ /// \pre COUNTOF(agreedValue) == AgreedValueLength()
+ /// \pre COUNTOF(staticPrivateKey) == StaticPrivateKeyLength()
+ /// \pre COUNTOF(ephemeralPrivateKey) == EphemeralPrivateKeyLength()
+ /// \pre COUNTOF(staticOtherPublicKey) == StaticPublicKeyLength()
+ /// \pre COUNTOF(ephemeralOtherPublicKey) == EphemeralPublicKeyLength()
bool Agree(byte *agreedValue,
const byte *staticPrivateKey, const byte *ephemeralPrivateKey,
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,