pub struct PublicKey { /* private fields */ }Expand description
Wraps a public SecKeyRef.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn attributes(&self) -> Result<Value>
pub fn attributes(&self) -> Result<Value>
Wraps the corresponding public SecKeyRef operation.
Sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
Wraps the corresponding public SecKeyRef operation.
Sourcepub fn external_representation(&self) -> Result<Vec<u8>>
pub fn external_representation(&self) -> Result<Vec<u8>>
Wraps the corresponding public SecKeyRef operation.
Sourcepub fn encrypt(
&self,
algorithm: EncryptionAlgorithm,
plaintext: &[u8],
) -> Result<Vec<u8>>
pub fn encrypt( &self, algorithm: EncryptionAlgorithm, plaintext: &[u8], ) -> Result<Vec<u8>>
Wraps the corresponding public SecKeyRef operation.
Sourcepub fn verify_signature(
&self,
algorithm: SignatureAlgorithm,
signed_data: &[u8],
signature: &[u8],
) -> Result<bool>
pub fn verify_signature( &self, algorithm: SignatureAlgorithm, signed_data: &[u8], signature: &[u8], ) -> Result<bool>
Wraps the corresponding public SecKeyRef operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl !Send for PublicKey
impl !Sync for PublicKey
impl Unpin for PublicKey
impl UnsafeUnpin for PublicKey
impl UnwindSafe for PublicKey
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