pub enum ParsedPrivateKey {
P256 {
scalar: [u8; 32],
public_sec1: Option<Vec<u8>>,
},
P384 {
scalar: [u8; 48],
public_sec1: Option<Vec<u8>>,
},
RsaPkcs1(Vec<u8>),
Ed25519(Vec<u8>),
}Expand description
解析后的私钥内容(按算法分派给 crate::sign 各类型)。
Variants§
P256
P-256:32 字节标量与(可选携带的)未压缩 SEC1 公钥点。
Fields
P384
P-384:48 字节标量与(可选携带的)未压缩 SEC1 公钥点。
Fields
RsaPkcs1(Vec<u8>)
RSA PKCS#1 私钥(DER 内容,供 sign::rsa 二次解析)。
Ed25519(Vec<u8>)
Ed25519:32 字节种子。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedPrivateKey
impl RefUnwindSafe for ParsedPrivateKey
impl Send for ParsedPrivateKey
impl Sync for ParsedPrivateKey
impl Unpin for ParsedPrivateKey
impl UnsafeUnpin for ParsedPrivateKey
impl UnwindSafe for ParsedPrivateKey
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