From b716e2c14f2d38838bec8572f2b1e8bb021eb120 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Tue, 23 May 2023 04:22:03 +0200 Subject: [PATCH] Fix a few typos (#311) --- src/errors.rs | 2 +- src/jwa.rs | 6 +++--- src/jwk.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 215e98fd..9f466f5b 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -71,7 +71,7 @@ pub enum ValidationError { /// A field required is missing from the token /// The parameter shows the name of the missing claim MissingRequiredClaims(Vec), - /// The token's expiry has passed (exp check failled, RFC7523 3.4) + /// The token's expiry has passed (exp check failed, RFC7523 3.4) /// The parameter show how long the token has expired Expired(Duration), /// The token is not yet valid (nbf check failed, RFC7523 3.5) diff --git a/src/jwa.rs b/src/jwa.rs index 3c3293a6..f35c9c33 100644 --- a/src/jwa.rs +++ b/src/jwa.rs @@ -630,7 +630,7 @@ impl ContentEncryptionAlgorithm { Ok(key) } - /// Encrypt some payload with the provided algorith + /// Encrypt some payload with the provided algorithm pub fn encrypt( self, payload: &[u8], @@ -646,7 +646,7 @@ impl ContentEncryptionAlgorithm { } } - /// Decrypt some payload with the provided algorith, + /// Decrypt some payload with the provided algorithm pub fn decrypt( self, encrypted: &EncryptionResult, @@ -714,7 +714,7 @@ impl ContentEncryptionAlgorithm { } } -/// Return a psuedo random number generator +/// Return a pseudo random number generator pub(crate) fn rng() -> &'static SystemRandom { use std::ops::Deref; diff --git a/src/jwk.rs b/src/jwk.rs index af5c9358..d885dc33 100644 --- a/src/jwk.rs +++ b/src/jwk.rs @@ -106,7 +106,7 @@ impl<'de> Deserialize<'de> for PublicKeyUse { /// Operations that the key is intended to be used for. This enum is serialized `untagged` #[derive(Clone, Debug, Eq, PartialEq)] pub enum KeyOperations { - /// Computer digitial signature or MAC + /// Compute digital signature or MAC Sign, /// Verify digital signature or MAC Verify, @@ -652,7 +652,7 @@ impl JWK { /// A JSON object that represents a set of JWKs. #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] pub struct JWKSet { - /// Containted JWKs + /// Contained JWKs pub keys: Vec>, }