pub fn try_from_slice<T: AsRef<[u8]>>(bytes: T) -> Result<Self> {
        let key = KeyBytes::copy_slice(bytes.as_ref());
        match get_key_kind(&key)? {
            KeyKind::RsaSecret => Ok(Self { inner: key }),
            _ => Err(Error::with_kind(ErrorKind::InvalidParameter)),
        }
    }
/// Parses a key from a byte slice.
///
/// Returns an error if the slice does not contain a valid RSA secret key.
Parses a key from a byte slice.
Returns an error if the slice does not contain a valid RSA secret key.
Parses a key from a byte slice . Returns an error if the slice does not contain a valid RSA secret key .
pub fn try_from_slice<T: AsRef<[u8]>>(bytes: T) -> Result<Self> {
        let key = KeyBytes::copy_slice(bytes.as_ref());
        match get_key_kind(&key)? {
            KeyKind::RsaSecret => Ok(Self { inner: key }),
            _ => Err(Error::with_kind(ErrorKind::InvalidParameter)),
        }
    }
pub fn try_from_slice < T : AsRef < [ u8 ] > > ( bytes : T ) -> Result < Self > { let key = KeyBytes :: copy_slice ( bytes . as_ref ( ) ) ; match get_key_kind ( & key ) ? { KeyKind :: RsaSecret => Ok ( Self { inner : key } ) , _ => Err ( Error :: with_kind ( ErrorKind :: InvalidParameter ) ) , } }
Parses a key from a byte slice.
Parses a key from a byte slice .
bytes
T
bytes
T