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