pub enum Key {
Bytes(Vec<u8>),
RsaPrivate(RsaPrivateKey),
RsaPublic(RsaPublicKey),
Ed25519Private(SigningKey),
Ed25519Public(VerifyingKey),
}Expand description
Key holds supported signing key material.
Variants§
Bytes(Vec<u8>)
RsaPrivate(RsaPrivateKey)
RsaPublic(RsaPublicKey)
Ed25519Private(SigningKey)
Ed25519Public(VerifyingKey)
Implementations§
Source§impl Key
impl Key
Sourcepub fn from_bytes(bytes: impl AsRef<[u8]>) -> Self
pub fn from_bytes(bytes: impl AsRef<[u8]>) -> Self
from_bytes creates a raw key payload (HMAC secret, DER bytes, etc.).
Sourcepub fn rsa_private(key: RsaPrivateKey) -> Self
pub fn rsa_private(key: RsaPrivateKey) -> Self
rsa_private wraps an RSA private key.
Sourcepub fn rsa_public(key: RsaPublicKey) -> Self
pub fn rsa_public(key: RsaPublicKey) -> Self
rsa_public wraps an RSA public key.
Sourcepub fn ed25519_private(key: SigningKey) -> Self
pub fn ed25519_private(key: SigningKey) -> Self
ed25519_private wraps an Ed25519 signing key.
Sourcepub fn ed25519_public(key: VerifyingKey) -> Self
pub fn ed25519_public(key: VerifyingKey) -> Self
ed25519_public wraps an Ed25519 verifying key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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