Struct sgx_crypto::rsa::Rsa3072KeyPair
source · pub struct Rsa3072KeyPair { /* private fields */ }Implementations§
source§impl Rsa3072KeyPair
impl Rsa3072KeyPair
pub fn create() -> SgxResult<Rsa3072KeyPair>
pub fn create_with_e(e: u32) -> SgxResult<Rsa3072KeyPair>
pub fn public_key(&self) -> Rsa3072PublicKey
pub fn private_key(&self) -> Rsa3072PrivateKey
pub fn encrypt(&self, plaintext: &[u8]) -> SgxResult<Vec<u8>>
pub fn decrypt(&self, ciphertext: &[u8]) -> SgxResult<Vec<u8>>
pub fn sign<T>(&self, data: &T) -> SgxResult<Rsa3072Signature>where T: ContiguousMemory + ?Sized,
pub fn sign_and_verify<T>(&self, data: &T) -> SgxResult<Rsa3072Signature>where T: ContiguousMemory + ?Sized,
pub fn verify<T>( &self, data: &T, signature: &Rsa3072Signature ) -> SgxResult<bool>where T: ContiguousMemory + ?Sized,
pub fn clear(&mut self)
Trait Implementations§
source§impl Clone for Rsa3072KeyPair
impl Clone for Rsa3072KeyPair
source§fn clone(&self) -> Rsa3072KeyPair
fn clone(&self) -> Rsa3072KeyPair
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 Debug for Rsa3072KeyPair
impl Debug for Rsa3072KeyPair
source§impl Default for Rsa3072KeyPair
impl Default for Rsa3072KeyPair
source§impl From<&Rsa3072Key> for Rsa3072KeyPair
impl From<&Rsa3072Key> for Rsa3072KeyPair
source§fn from(key_pair: &Rsa3072Key) -> Rsa3072KeyPair
fn from(key_pair: &Rsa3072Key) -> Rsa3072KeyPair
Converts to this type from the input type.
source§impl From<&Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
impl From<&Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
source§fn from(key_pair: &Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
fn from(key_pair: &Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
Converts to this type from the input type.
source§impl From<&Rsa3072Param> for Rsa3072KeyPair
impl From<&Rsa3072Param> for Rsa3072KeyPair
source§fn from(param: &Rsa3072Param) -> Rsa3072KeyPair
fn from(param: &Rsa3072Param) -> Rsa3072KeyPair
Converts to this type from the input type.
source§impl From<(Rsa3072PrivateKey, Rsa3072PublicKey)> for Rsa3072KeyPair
impl From<(Rsa3072PrivateKey, Rsa3072PublicKey)> for Rsa3072KeyPair
source§fn from(key_pair: (Rsa3072PrivateKey, Rsa3072PublicKey)) -> Rsa3072KeyPair
fn from(key_pair: (Rsa3072PrivateKey, Rsa3072PublicKey)) -> Rsa3072KeyPair
Converts to this type from the input type.
source§impl From<Rsa3072Key> for Rsa3072KeyPair
impl From<Rsa3072Key> for Rsa3072KeyPair
source§fn from(key_pair: Rsa3072Key) -> Rsa3072KeyPair
fn from(key_pair: Rsa3072Key) -> Rsa3072KeyPair
Converts to this type from the input type.
source§impl From<Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
impl From<Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
source§fn from(key_pair: Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
fn from(key_pair: Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
Converts to this type from the input type.
source§impl From<Rsa3072Param> for Rsa3072KeyPair
impl From<Rsa3072Param> for Rsa3072KeyPair
source§fn from(param: Rsa3072Param) -> Rsa3072KeyPair
fn from(param: Rsa3072Param) -> Rsa3072KeyPair
Converts to this type from the input type.
source§impl PartialEq for Rsa3072KeyPair
impl PartialEq for Rsa3072KeyPair
source§fn eq(&self, other: &Rsa3072KeyPair) -> bool
fn eq(&self, other: &Rsa3072KeyPair) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl TryFrom<&[u8]> for Rsa3072KeyPair
impl TryFrom<&[u8]> for Rsa3072KeyPair
§type Error = TryFromSliceError
type Error = TryFromSliceError
The type returned in the event of a conversion error.
impl BytewiseEquality for Rsa3072KeyPair
impl ContiguousMemory for Rsa3072KeyPair
impl Copy for Rsa3072KeyPair
impl Eq for Rsa3072KeyPair
impl StructuralEq for Rsa3072KeyPair
impl StructuralPartialEq for Rsa3072KeyPair
Auto Trait Implementations§
impl RefUnwindSafe for Rsa3072KeyPair
impl Send for Rsa3072KeyPair
impl Sync for Rsa3072KeyPair
impl Unpin for Rsa3072KeyPair
impl UnwindSafe for Rsa3072KeyPair
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