Lines Matching full:algorithm
23 /// An HKDF algorithm.
25 pub struct Algorithm(hmac::Algorithm); struct
27 impl Algorithm { implementation
28 /// The underlying HMAC algorithm.
30 pub fn hmac_algorithm(&self) -> hmac::Algorithm { in hmac_algorithm() argument
36 pub static HKDF_SHA1_FOR_LEGACY_USE_ONLY: Algorithm =
37 Algorithm(hmac::HMAC_SHA1_FOR_LEGACY_USE_ONLY);
40 pub static HKDF_SHA256: Algorithm = Algorithm(hmac::HMAC_SHA256);
43 pub static HKDF_SHA384: Algorithm = Algorithm(hmac::HMAC_SHA384);
46 pub static HKDF_SHA512: Algorithm = Algorithm(hmac::HMAC_SHA512);
48 impl KeyType for Algorithm { implementation
60 /// algorithm.
64 pub fn new(algorithm: Algorithm, value: &[u8]) -> Self { in new() argument
65 Salt(hmac::Key::new(algorithm.0, value)) in new()
80 Prk(hmac::Key::new(salt.algorithm(), prk.as_ref())) in extract()
83 /// The algorithm used to derive this salt.
85 pub fn algorithm(&self) -> Algorithm { in algorithm() argument
86 Algorithm(self.0.algorithm()) in algorithm()
90 impl From<Okm<'_, Algorithm>> for Salt {
91 fn from(okm: Okm<'_, Algorithm>) -> Self { in from()
117 pub fn new_less_safe(algorithm: Algorithm, value: &[u8]) -> Self { in new_less_safe() argument
118 Self(hmac::Key::new(algorithm.hmac_algorithm(), value)) in new_less_safe()
133 if len_cached > 255 * self.0.algorithm().digest_algorithm().output_len { in expand()
145 impl From<Okm<'_, Algorithm>> for Prk {
146 fn from(okm: Okm<Algorithm>) -> Self { in from()
179 /// times the size of the digest algorithm's output. (This is the limit
198 let digest_alg = prk.0.algorithm().digest_algorithm(); in fill_okm()