pub enum HashingAlgorithm {
Sha256,
}Expand description
An identifier of the algorithm used for hashing. All the algorithm variants
are deemed secure for the SD-JWT purposes.
The string value of the algorithm is used in the _sd_alg field of the
SD-JWT, formatted as specified in the IANA Named Information Hash
Algorithm Registry.
The default algorithm is SHA-256, as specified here.
The HashingAlgorithm can be parsed from string, expecting the same
format as specified above.
Variants§
Sha256
SHA-256 algorithm for hashing.
Implementations§
Source§impl HashingAlgorithm
impl HashingAlgorithm
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Returns the string value of the algorithm, formatted as specified in the IANA Named Information Hash Algorithm Registry.
Trait Implementations§
Source§impl Clone for HashingAlgorithm
impl Clone for HashingAlgorithm
Source§fn clone(&self) -> HashingAlgorithm
fn clone(&self) -> HashingAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HashingAlgorithm
impl Debug for HashingAlgorithm
Source§impl Default for HashingAlgorithm
impl Default for HashingAlgorithm
Source§fn default() -> HashingAlgorithm
fn default() -> HashingAlgorithm
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HashingAlgorithm
impl<'de> Deserialize<'de> for HashingAlgorithm
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for HashingAlgorithm
impl Display for HashingAlgorithm
Source§impl FromStr for HashingAlgorithm
impl FromStr for HashingAlgorithm
Source§impl PartialEq for HashingAlgorithm
impl PartialEq for HashingAlgorithm
Source§impl Serialize for HashingAlgorithm
impl Serialize for HashingAlgorithm
impl Copy for HashingAlgorithm
impl Eq for HashingAlgorithm
impl StructuralPartialEq for HashingAlgorithm
Auto Trait Implementations§
impl Freeze for HashingAlgorithm
impl RefUnwindSafe for HashingAlgorithm
impl Send for HashingAlgorithm
impl Sync for HashingAlgorithm
impl Unpin for HashingAlgorithm
impl UnsafeUnpin for HashingAlgorithm
impl UnwindSafe for HashingAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C> SignWithKey<String> for Cwhere
C: ToBase64,
impl<C> SignWithKey<String> for Cwhere
C: ToBase64,
fn sign_with_key(self, key: &impl SigningAlgorithm) -> Result<String, Error>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.