Skip to content

Commit e9d4fc2

Browse files
committed
Add code comments to public API.
1 parent 2db787d commit e9d4fc2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/bitwarden-wasm-internal/src/crypto.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@ impl ClientCrypto {
3434
Ok(self.0.crypto().initialize_org_crypto(req).await?)
3535
}
3636

37+
/// Generates a new key pair and encrypts the private key with the initialized user key.
38+
/// Needs to be called after `initialize_user_crypto`.
3739
pub fn make_key_pair(&self) -> Result<MakeKeyPairResponse> {
3840
Ok(self.0.crypto().make_key_pair()?)
3941
}
4042

43+
/// Verifies a user's asymmetric keys by decrypting the private key with the initialized user
44+
/// key. Returns if the private key is decryptable and if it is a valid matching key.
45+
/// Needs to be called after `initialize_user_crypto`.
4146
pub fn verify_asymmetric_keys(
4247
&self,
4348
request: VerifyAsymmetricKeysRequest,

0 commit comments

Comments
 (0)