pub struct LAPrivateKey { /* private fields */ }Expand description
Managed wrapper around Apple’s LAPrivateKey.
Implementations§
Source§impl LAPrivateKey
impl LAPrivateKey
Sourcepub fn public_key(&self) -> Result<LAPublicKey>
pub fn public_key(&self) -> Result<LAPublicKey>
Borrow the public-key counterpart of this private key.
§Errors
Returns an error if the Swift bridge rejects the request.
Sourcepub fn can_sign_using(&self, algorithm: &SecKeyAlgorithm) -> Result<bool>
pub fn can_sign_using(&self, algorithm: &SecKeyAlgorithm) -> Result<bool>
Check whether an algorithm can sign with this key.
§Errors
Returns an error if the Swift bridge rejects the request.
Sourcepub fn can_decrypt_using(&self, algorithm: &SecKeyAlgorithm) -> Result<bool>
pub fn can_decrypt_using(&self, algorithm: &SecKeyAlgorithm) -> Result<bool>
Check whether an algorithm can decrypt with this key.
§Errors
Returns an error if the Swift bridge rejects the request.
Sourcepub fn can_exchange_keys_using(
&self,
algorithm: &SecKeyAlgorithm,
) -> Result<bool>
pub fn can_exchange_keys_using( &self, algorithm: &SecKeyAlgorithm, ) -> Result<bool>
Check whether an algorithm can be used for key exchange.
§Errors
Returns an error if the Swift bridge rejects the request.
Sourcepub fn exchange_keys_with_public_key(
&self,
public_key: &[u8],
algorithm: &SecKeyAlgorithm,
parameters: &SecKeyExchangeParameters,
) -> Result<Vec<u8>>
pub fn exchange_keys_with_public_key( &self, public_key: &[u8], algorithm: &SecKeyAlgorithm, parameters: &SecKeyExchangeParameters, ) -> Result<Vec<u8>>
Perform a Diffie-Hellman-style key exchange with a remote public key.
§Errors
Returns a mapped framework or bridge error if key exchange fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LAPrivateKey
impl RefUnwindSafe for LAPrivateKey
impl !Send for LAPrivateKey
impl !Sync for LAPrivateKey
impl Unpin for LAPrivateKey
impl UnsafeUnpin for LAPrivateKey
impl UnwindSafe for LAPrivateKey
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