pub struct SignKey { /* private fields */ }Expand description
jwt 签名密钥
Implementations§
Source§impl SignKey
impl SignKey
Sourcepub fn from_secret(secret: &[u8]) -> Self
pub fn from_secret(secret: &[u8]) -> Self
从一个私密二进制数据构造签名的密钥
Sourcepub fn from_base64_secret(secret: &str) -> Self
pub fn from_base64_secret(secret: &str) -> Self
从base64编码的字符串私密数据构造签名的密钥
Sourcepub fn from_rsa_pem(key: &[u8]) -> Self
pub fn from_rsa_pem(key: &[u8]) -> Self
从rsa的pem格式私钥构造签名密钥
Sourcepub fn from_rsa_der(key: &[u8]) -> Self
pub fn from_rsa_der(key: &[u8]) -> Self
从rsa的der格式私钥构造签名密钥
Sourcepub fn from_ec_pem(key: &[u8]) -> Self
pub fn from_ec_pem(key: &[u8]) -> Self
从pem格式椭圆曲线私钥构造签名密钥
Sourcepub fn from_ec_der(key: &[u8]) -> Self
pub fn from_ec_der(key: &[u8]) -> Self
从der格式椭圆曲线私钥构造签名密钥
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SignKey
impl RefUnwindSafe for SignKey
impl Send for SignKey
impl Sync for SignKey
impl Unpin for SignKey
impl UnwindSafe for SignKey
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