pub struct PrivateKey {
pub scheme: SignatureSchemeId,
pub bytes: Zeroizing<Vec<u8>>,
}Fields§
§scheme: SignatureSchemeId§bytes: Zeroizing<Vec<u8>>Implementations§
Source§impl PrivateKey
impl PrivateKey
pub fn new( scheme: SignatureSchemeId, bytes: Vec<u8>, ) -> Result<Self, CryptoError>
pub fn to_bytes(&self) -> Result<Vec<u8>, CryptoError>
pub fn from_bytes(encoded: &[u8]) -> Result<Self, CryptoError>
Trait Implementations§
Source§impl Debug for PrivateKey
impl Debug for PrivateKey
Source§impl<'de> Deserialize<'de> for PrivateKey
impl<'de> Deserialize<'de> for PrivateKey
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 PartialEq for PrivateKey
impl PartialEq for PrivateKey
Source§impl Serialize for PrivateKey
impl Serialize for PrivateKey
impl Eq for PrivateKey
impl StructuralPartialEq for PrivateKey
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnsafeUnpin for PrivateKey
impl UnwindSafe for PrivateKey
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