MCPcopy Create free account
hub / github.com/RustCrypto/RSA / i2osp_zeroizing

Function i2osp_zeroizing

src/algorithms/pad.rs:62–68  ·  view source on GitHub ↗
(input: BoxedUint, padded_len: usize)

Source from the content-addressed store, hash-verified

60/// [draft-irtf-cfrg-rsa-guidance-10 §7.2]: https://www.ietf.org/archive/id/draft-irtf-cfrg-rsa-guidance-10.html#section-7.2
61#[inline]
62pub(crate) fn i2osp_zeroizing(input: BoxedUint, padded_len: usize) -> Zeroizing<Vec<u8>> {
63 let input = Zeroizing::new(input);
64 let bytes = Zeroizing::new(input.to_be_bytes());
65 let mut out = Zeroizing::new(vec![0u8; padded_len]);
66 be_pad_into(&bytes, &mut out);
67 out
68}
69
70/// Octet-String-to-Integer Primitive (OS2IP) from [RFC8017 §4.2].
71///

Callers 9

decryptFunction · 0.85
decryptFunction · 0.85
decrypt_digestFunction · 0.85
be_padFunction · 0.85
os2ip_round_tripFunction · 0.85
deriveMethod · 0.85
draft_10_vectorsFunction · 0.85
i2ospFunction · 0.85

Calls 1

be_pad_intoFunction · 0.85

Tested by 2

be_padFunction · 0.68
os2ip_round_tripFunction · 0.68