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

Function uint_from_slice

src/encoding.rs:25–27  ·  view source on GitHub ↗
(data: &[u8], bits: u32)

Source from the content-addressed store, hash-verified

23// PKCS#1
24
25fn uint_from_slice(data: &[u8], bits: u32) -> pkcs1::Result<BoxedUint> {
26 BoxedUint::from_be_slice(data, bits).map_err(|_| pkcs1::Error::KeyMalformed)
27}
28
29impl pkcs1::DecodeRsaPrivateKey for PrivateKey {
30 fn from_pkcs1_der(bytes: &[u8]) -> pkcs1::Result<Self> {

Callers 1

try_fromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected