aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov/pkcs11/p11_mechanism.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/prov/pkcs11/p11_mechanism.h')
-rw-r--r--src/lib/prov/pkcs11/p11_mechanism.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/prov/pkcs11/p11_mechanism.h b/src/lib/prov/pkcs11/p11_mechanism.h
index 0f7b6f07c..dde5e5b07 100644
--- a/src/lib/prov/pkcs11/p11_mechanism.h
+++ b/src/lib/prov/pkcs11/p11_mechanism.h
@@ -21,7 +21,7 @@ namespace PKCS11 {
/**
* Simple class to build and hold the data for a CK_MECHANISM struct
* for RSA (encryption/decryption, signature/verification)
-* and EC (ecdsa signature/verification, ecdh key derivation)
+* and EC (ECDSA signature/verification, ECDH key derivation).
*/
class MechanismWrapper final
{
@@ -58,14 +58,22 @@ class MechanismWrapper final
*/
static MechanismWrapper create_ecdh_mechanism(const std::string& params);
- /// Sets the salt for the ECDH mechanism parameters
+ /**
+ * Sets the salt for the ECDH mechanism parameters.
+ * @param salt the salt
+ * @param salt_len size of the salt in bytes
+ */
inline void set_ecdh_salt(const byte salt[], size_t salt_len)
{
m_parameters->ecdh_params.pSharedData = const_cast<byte*>(salt);
m_parameters->ecdh_params.ulSharedDataLen = salt_len;
}
- /// Sets the public key of the other party for the ECDH mechanism parameters
+ /**
+ * Sets the public key of the other party for the ECDH mechanism parameters.
+ * @param other_key key of the other party
+ * @param other_key_len size of the key of the other party in bytes
+ */
inline void set_ecdh_other_key(const byte other_key[], size_t other_key_len)
{
m_parameters->ecdh_params.pPublicData = const_cast<byte*>(other_key);