Struct sgx_crypto::sm2::Sm2PrivateKey
source · [−]pub struct Sm2PrivateKey(_);
Implementations
sourceimpl Sm2PrivateKey
impl Sm2PrivateKey
pub fn sign<T: ?Sized>(&self, data: &T) -> SgxResult<Sm2Signature>where
T: ContiguousMemory,
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
sourceimpl AsRef<[u8; 32]> for Sm2PrivateKey
impl AsRef<[u8; 32]> for Sm2PrivateKey
sourceimpl Clone for Sm2PrivateKey
impl Clone for Sm2PrivateKey
sourcefn clone(&self) -> Sm2PrivateKey
fn clone(&self) -> Sm2PrivateKey
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl ConstTimeEq<Sm2PrivateKey> for Sm2PrivateKey
impl ConstTimeEq<Sm2PrivateKey> for Sm2PrivateKey
fn ct_eq(&self, other: &Sm2PrivateKey) -> bool
fn ct_ne(&self, other: &T) -> bool
sourceimpl Debug for Sm2PrivateKey
impl Debug for Sm2PrivateKey
sourceimpl Default for Sm2PrivateKey
impl Default for Sm2PrivateKey
sourcefn default() -> Sm2PrivateKey
fn default() -> Sm2PrivateKey
Returns the “default value” for a type. Read more
sourceimpl From<&[u8; 32]> for Sm2PrivateKey
impl From<&[u8; 32]> for Sm2PrivateKey
sourcefn from(key: &[u8; 32]) -> Sm2PrivateKey
fn from(key: &[u8; 32]) -> Sm2PrivateKey
Converts to this type from the input type.
sourceimpl From<&AlignEc256PrivateKey> for Sm2PrivateKey
impl From<&AlignEc256PrivateKey> for Sm2PrivateKey
sourcefn from(key: &AlignEc256PrivateKey) -> Sm2PrivateKey
fn from(key: &AlignEc256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
sourceimpl From<&Ec256PrivateKey> for Sm2PrivateKey
impl From<&Ec256PrivateKey> for Sm2PrivateKey
sourcefn from(key: &Ec256PrivateKey) -> Sm2PrivateKey
fn from(key: &Ec256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
sourceimpl From<&Sm2PrivateKey> for [u8; 32]
impl From<&Sm2PrivateKey> for [u8; 32]
sourcefn from(key: &Sm2PrivateKey) -> [u8; 32]
fn from(key: &Sm2PrivateKey) -> [u8; 32]
Converts to this type from the input type.
sourceimpl From<&Sm2PrivateKey> for AlignEc256PrivateKey
impl From<&Sm2PrivateKey> for AlignEc256PrivateKey
sourcefn from(key: &Sm2PrivateKey) -> AlignEc256PrivateKey
fn from(key: &Sm2PrivateKey) -> AlignEc256PrivateKey
Converts to this type from the input type.
sourceimpl From<&Sm2PrivateKey> for Ec256PrivateKey
impl From<&Sm2PrivateKey> for Ec256PrivateKey
sourcefn from(key: &Sm2PrivateKey) -> Ec256PrivateKey
fn from(key: &Sm2PrivateKey) -> Ec256PrivateKey
Converts to this type from the input type.
sourceimpl From<[u8; 32]> for Sm2PrivateKey
impl From<[u8; 32]> for Sm2PrivateKey
sourcefn from(key: [u8; 32]) -> Sm2PrivateKey
fn from(key: [u8; 32]) -> Sm2PrivateKey
Converts to this type from the input type.
sourceimpl From<AlignEc256PrivateKey> for Sm2PrivateKey
impl From<AlignEc256PrivateKey> for Sm2PrivateKey
sourcefn from(key: AlignEc256PrivateKey) -> Sm2PrivateKey
fn from(key: AlignEc256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
sourceimpl From<Ec256PrivateKey> for Sm2PrivateKey
impl From<Ec256PrivateKey> for Sm2PrivateKey
sourcefn from(key: Ec256PrivateKey) -> Sm2PrivateKey
fn from(key: Ec256PrivateKey) -> Sm2PrivateKey
Converts to this type from the input type.
sourceimpl From<Sm2PrivateKey> for [u8; 32]
impl From<Sm2PrivateKey> for [u8; 32]
sourcefn from(key: Sm2PrivateKey) -> [u8; 32]
fn from(key: Sm2PrivateKey) -> [u8; 32]
Converts to this type from the input type.
sourceimpl From<Sm2PrivateKey> for AlignEc256PrivateKey
impl From<Sm2PrivateKey> for AlignEc256PrivateKey
sourcefn from(key: Sm2PrivateKey) -> AlignEc256PrivateKey
fn from(key: Sm2PrivateKey) -> AlignEc256PrivateKey
Converts to this type from the input type.
sourceimpl From<Sm2PrivateKey> for Ec256PrivateKey
impl From<Sm2PrivateKey> for Ec256PrivateKey
sourcefn from(key: Sm2PrivateKey) -> Ec256PrivateKey
fn from(key: Sm2PrivateKey) -> Ec256PrivateKey
Converts to this type from the input type.
sourceimpl PartialEq<Sm2PrivateKey> for Sm2PrivateKey
impl PartialEq<Sm2PrivateKey> for Sm2PrivateKey
sourcefn eq(&self, other: &Sm2PrivateKey) -> bool
fn eq(&self, other: &Sm2PrivateKey) -> bool
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
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> EnclaveRange for Twhere
T: ContiguousMemory,
impl<T> EnclaveRange for Twhere
T: ContiguousMemory,
default fn is_enclave_range(&self) -> bool
default fn is_host_range(&self) -> bool
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more