Struct sgx_crypto::rsa::Rsa3072KeyPair
source · [−]pub struct Rsa3072KeyPair { /* private fields */ }
Implementations
sourceimpl 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: ?Sized>(&self, data: &T) -> SgxResult<Rsa3072Signature>where
T: ContiguousMemory,
pub fn sign_and_verify<T: ?Sized>(&self, data: &T) -> SgxResult<Rsa3072Signature>where
T: ContiguousMemory,
pub fn verify<T: ?Sized>(
&self,
data: &T,
signature: &Rsa3072Signature
) -> SgxResult<bool>where
T: ContiguousMemory,
pub fn clear(&mut self)
Trait Implementations
sourceimpl AsRef<[u8; 1736]> for Rsa3072KeyPair
impl AsRef<[u8; 1736]> for Rsa3072KeyPair
sourceimpl Clone for Rsa3072KeyPair
impl Clone for Rsa3072KeyPair
sourcefn clone(&self) -> Rsa3072KeyPair
fn clone(&self) -> Rsa3072KeyPair
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 Debug for Rsa3072KeyPair
impl Debug for Rsa3072KeyPair
sourceimpl Default for Rsa3072KeyPair
impl Default for Rsa3072KeyPair
sourceimpl From<&[u8; 1736]> for Rsa3072KeyPair
impl From<&[u8; 1736]> for Rsa3072KeyPair
sourcefn from(array: &[u8; 1736]) -> Rsa3072KeyPair
fn from(array: &[u8; 1736]) -> Rsa3072KeyPair
Converts to this type from the input type.
sourceimpl From<&Rsa3072Key> for Rsa3072KeyPair
impl From<&Rsa3072Key> for Rsa3072KeyPair
sourcefn from(key_pair: &Rsa3072Key) -> Rsa3072KeyPair
fn from(key_pair: &Rsa3072Key) -> Rsa3072KeyPair
Converts to this type from the input type.
sourceimpl From<&Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
impl From<&Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
sourcefn from(key_pair: &Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
fn from(key_pair: &Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
Converts to this type from the input type.
sourceimpl From<&Rsa3072Param> for Rsa3072KeyPair
impl From<&Rsa3072Param> for Rsa3072KeyPair
sourcefn from(param: &Rsa3072Param) -> Rsa3072KeyPair
fn from(param: &Rsa3072Param) -> Rsa3072KeyPair
Converts to this type from the input type.
sourceimpl From<[u8; 1736]> for Rsa3072KeyPair
impl From<[u8; 1736]> for Rsa3072KeyPair
sourcefn from(array: [u8; 1736]) -> Rsa3072KeyPair
fn from(array: [u8; 1736]) -> Rsa3072KeyPair
Converts to this type from the input type.
sourceimpl From<(Rsa3072PrivateKey, Rsa3072PublicKey)> for Rsa3072KeyPair
impl From<(Rsa3072PrivateKey, Rsa3072PublicKey)> for Rsa3072KeyPair
sourcefn from(key_pair: (Rsa3072PrivateKey, Rsa3072PublicKey)) -> Rsa3072KeyPair
fn from(key_pair: (Rsa3072PrivateKey, Rsa3072PublicKey)) -> Rsa3072KeyPair
Converts to this type from the input type.
sourceimpl From<Rsa3072Key> for Rsa3072KeyPair
impl From<Rsa3072Key> for Rsa3072KeyPair
sourcefn from(key_pair: Rsa3072Key) -> Rsa3072KeyPair
fn from(key_pair: Rsa3072Key) -> Rsa3072KeyPair
Converts to this type from the input type.
sourceimpl From<Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
impl From<Rsa3072KeyPair> for (Rsa3072PrivateKey, Rsa3072PublicKey)
sourcefn from(key_pair: Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
fn from(key_pair: Rsa3072KeyPair) -> (Rsa3072PrivateKey, Rsa3072PublicKey)
Converts to this type from the input type.
sourceimpl From<Rsa3072Param> for Rsa3072KeyPair
impl From<Rsa3072Param> for Rsa3072KeyPair
sourcefn from(param: Rsa3072Param) -> Rsa3072KeyPair
fn from(param: Rsa3072Param) -> Rsa3072KeyPair
Converts to this type from the input type.
sourceimpl PartialEq<Rsa3072KeyPair> for Rsa3072KeyPair
impl PartialEq<Rsa3072KeyPair> for Rsa3072KeyPair
sourcefn eq(&self, other: &Rsa3072KeyPair) -> bool
fn eq(&self, other: &Rsa3072KeyPair) -> bool
sourceimpl 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
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