Struct sgx_crypto::sm2::Sm2PublicKey
source · [−]pub struct Sm2PublicKey(_);
Implementations
sourceimpl Sm2PublicKey
impl Sm2PublicKey
pub fn verify<T: ?Sized>(
&self,
data: &T,
signature: &Sm2Signature
) -> SgxResult<bool>where
T: ContiguousMemory,
pub fn verify_hash(
&self,
hash: &Sha256Hash,
signature: &Sm2Signature
) -> SgxResult<bool>
pub fn check_point(&self) -> SgxResult<bool>
pub fn from_private_key(key: &Sm2PrivateKey) -> SgxResult<Sm2PublicKey>
pub fn public_key(&self) -> Ec256PublicKey
pub fn clear(&mut self)
Trait Implementations
sourceimpl AsRef<[u8; 64]> for Sm2PublicKey
impl AsRef<[u8; 64]> for Sm2PublicKey
sourceimpl Clone for Sm2PublicKey
impl Clone for Sm2PublicKey
sourcefn clone(&self) -> Sm2PublicKey
fn clone(&self) -> Sm2PublicKey
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl ConstTimeEq<Sm2PublicKey> for Sm2PublicKey
impl ConstTimeEq<Sm2PublicKey> for Sm2PublicKey
sourceimpl Debug for Sm2PublicKey
impl Debug for Sm2PublicKey
sourceimpl Default for Sm2PublicKey
impl Default for Sm2PublicKey
sourcefn default() -> Sm2PublicKey
fn default() -> Sm2PublicKey
Returns the “default value” for a type. Read more
sourceimpl From<&[u8; 64]> for Sm2PublicKey
impl From<&[u8; 64]> for Sm2PublicKey
sourcefn from(key: &[u8; 64]) -> Sm2PublicKey
fn from(key: &[u8; 64]) -> Sm2PublicKey
Converts to this type from the input type.
sourceimpl From<&Ec256PublicKey> for Sm2PublicKey
impl From<&Ec256PublicKey> for Sm2PublicKey
sourcefn from(key: &Ec256PublicKey) -> Sm2PublicKey
fn from(key: &Ec256PublicKey) -> Sm2PublicKey
Converts to this type from the input type.
sourceimpl From<&Sm2PublicKey> for [u8; 64]
impl From<&Sm2PublicKey> for [u8; 64]
sourcefn from(key: &Sm2PublicKey) -> [u8; 64]
fn from(key: &Sm2PublicKey) -> [u8; 64]
Converts to this type from the input type.
sourceimpl From<&Sm2PublicKey> for Ec256PublicKey
impl From<&Sm2PublicKey> for Ec256PublicKey
sourcefn from(key: &Sm2PublicKey) -> Ec256PublicKey
fn from(key: &Sm2PublicKey) -> Ec256PublicKey
Converts to this type from the input type.
sourceimpl From<[u8; 64]> for Sm2PublicKey
impl From<[u8; 64]> for Sm2PublicKey
sourcefn from(key: [u8; 64]) -> Sm2PublicKey
fn from(key: [u8; 64]) -> Sm2PublicKey
Converts to this type from the input type.
sourceimpl From<Ec256PublicKey> for Sm2PublicKey
impl From<Ec256PublicKey> for Sm2PublicKey
sourcefn from(key: Ec256PublicKey) -> Sm2PublicKey
fn from(key: Ec256PublicKey) -> Sm2PublicKey
Converts to this type from the input type.
sourceimpl From<Sm2PublicKey> for [u8; 64]
impl From<Sm2PublicKey> for [u8; 64]
sourcefn from(key: Sm2PublicKey) -> [u8; 64]
fn from(key: Sm2PublicKey) -> [u8; 64]
Converts to this type from the input type.
sourceimpl From<Sm2PublicKey> for Ec256PublicKey
impl From<Sm2PublicKey> for Ec256PublicKey
sourcefn from(key: Sm2PublicKey) -> Ec256PublicKey
fn from(key: Sm2PublicKey) -> Ec256PublicKey
Converts to this type from the input type.
sourceimpl PartialEq<Sm2PublicKey> for Sm2PublicKey
impl PartialEq<Sm2PublicKey> for Sm2PublicKey
sourcefn eq(&self, other: &Sm2PublicKey) -> bool
fn eq(&self, other: &Sm2PublicKey) -> bool
impl BytewiseEquality for Sm2PublicKey
impl ContiguousMemory for Sm2PublicKey
impl Copy for Sm2PublicKey
impl Eq for Sm2PublicKey
impl StructuralEq for Sm2PublicKey
impl StructuralPartialEq for Sm2PublicKey
Auto Trait Implementations
impl RefUnwindSafe for Sm2PublicKey
impl Send for Sm2PublicKey
impl Sync for Sm2PublicKey
impl Unpin for Sm2PublicKey
impl UnwindSafe for Sm2PublicKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more