pub struct Sm9SignMasterKey { /* private fields */ }Implementations§
Source§impl Sm9SignMasterKey
impl Sm9SignMasterKey
Sourcepub fn generate() -> Result<Self, GmsslError>
pub fn generate() -> Result<Self, GmsslError>
Generate a new SM9 signature master key.
Sourcepub fn extract_key(&self, id: &str) -> Result<Sm9SignKey, GmsslError>
pub fn extract_key(&self, id: &str) -> Result<Sm9SignKey, GmsslError>
Extract a user’s signing private key from the master key.
Sourcepub fn from_encrypted_pem(
pem_data: &[u8],
password: &str,
) -> Result<Self, GmsslError>
pub fn from_encrypted_pem( pem_data: &[u8], password: &str, ) -> Result<Self, GmsslError>
Import from encrypted PEM (in-memory).
Sourcepub fn to_encrypted_pem(&self, password: &str) -> Result<Vec<u8>, GmsslError>
pub fn to_encrypted_pem(&self, password: &str) -> Result<Vec<u8>, GmsslError>
Export to encrypted PEM (in-memory).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sm9SignMasterKey
impl RefUnwindSafe for Sm9SignMasterKey
impl Send for Sm9SignMasterKey
impl Sync for Sm9SignMasterKey
impl Unpin for Sm9SignMasterKey
impl UnsafeUnpin for Sm9SignMasterKey
impl UnwindSafe for Sm9SignMasterKey
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