Struct sgx_crypto::sm2::Sm2PrivateKey
source · pub struct Sm2PrivateKey(/* private fields */);Implementations§
source§impl Sm2PrivateKey
impl Sm2PrivateKey
pub fn sign<T>(&self, data: &T) -> SgxResult<Sm2Signature>where T: ContiguousMemory + ?Sized,
pub fn create_with_seed<H: AsRef<[u8]>>(hash_drg: H) -> SgxResult<Sm2PrivateKey>
pub fn export_public_key(&self) -> SgxResult<Sm2PublicKey>
pub fn private_key(&self) -> Ec256PrivateKey
pub fn clear(&mut self)
Trait Implementations§
source§impl Clone for Sm2PrivateKey
impl Clone for Sm2PrivateKey
source§fn clone(&self) -> Sm2PrivateKey
fn clone(&self) -> Sm2PrivateKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl ConstTimeEq for Sm2PrivateKey
impl ConstTimeEq for Sm2PrivateKey
source§impl Debug for Sm2PrivateKey
impl Debug for Sm2PrivateKey
source§impl Default for Sm2PrivateKey
impl Default for Sm2PrivateKey
source§fn default() -> Sm2PrivateKey
fn default() -> Sm2PrivateKey
Returns the “default value” for a type. Read more
source§impl From<&AlignEc256PrivateKey> for Sm2PrivateKey
impl From<&AlignEc256PrivateKey> for Sm2PrivateKey
source§fn from(key: &AlignEc256PrivateKey) -> Sm2PrivateKey
fn from(key: &AlignEc256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
source§impl From<&Ec256PrivateKey> for Sm2PrivateKey
impl From<&Ec256PrivateKey> for Sm2PrivateKey
source§fn from(key: &Ec256PrivateKey) -> Sm2PrivateKey
fn from(key: &Ec256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
source§impl From<&Sm2PrivateKey> for AlignEc256PrivateKey
impl From<&Sm2PrivateKey> for AlignEc256PrivateKey
source§fn from(key: &Sm2PrivateKey) -> AlignEc256PrivateKey
fn from(key: &Sm2PrivateKey) -> AlignEc256PrivateKey
Converts to this type from the input type.
source§impl From<&Sm2PrivateKey> for Ec256PrivateKey
impl From<&Sm2PrivateKey> for Ec256PrivateKey
source§fn from(key: &Sm2PrivateKey) -> Ec256PrivateKey
fn from(key: &Sm2PrivateKey) -> Ec256PrivateKey
Converts to this type from the input type.
source§impl From<AlignEc256PrivateKey> for Sm2PrivateKey
impl From<AlignEc256PrivateKey> for Sm2PrivateKey
source§fn from(key: AlignEc256PrivateKey) -> Sm2PrivateKey
fn from(key: AlignEc256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
source§impl From<Ec256PrivateKey> for Sm2PrivateKey
impl From<Ec256PrivateKey> for Sm2PrivateKey
source§fn from(key: Ec256PrivateKey) -> Sm2PrivateKey
fn from(key: Ec256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
source§impl From<Sm2PrivateKey> for AlignEc256PrivateKey
impl From<Sm2PrivateKey> for AlignEc256PrivateKey
source§fn from(key: Sm2PrivateKey) -> AlignEc256PrivateKey
fn from(key: Sm2PrivateKey) -> AlignEc256PrivateKey
Converts to this type from the input type.
source§impl From<Sm2PrivateKey> for Ec256PrivateKey
impl From<Sm2PrivateKey> for Ec256PrivateKey
source§fn from(key: Sm2PrivateKey) -> Ec256PrivateKey
fn from(key: Sm2PrivateKey) -> Ec256PrivateKey
Converts to this type from the input type.
source§impl PartialEq for Sm2PrivateKey
impl PartialEq for Sm2PrivateKey
source§fn eq(&self, other: &Sm2PrivateKey) -> bool
fn eq(&self, other: &Sm2PrivateKey) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl BytewiseEquality for Sm2PrivateKey
impl ContiguousMemory for Sm2PrivateKey
impl Copy for Sm2PrivateKey
impl Eq for Sm2PrivateKey
impl StructuralEq for Sm2PrivateKey
impl StructuralPartialEq for Sm2PrivateKey
Auto Trait Implementations§
impl RefUnwindSafe for Sm2PrivateKey
impl Send for Sm2PrivateKey
impl Sync for Sm2PrivateKey
impl Unpin for Sm2PrivateKey
impl UnwindSafe for Sm2PrivateKey
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