pub struct PrivateKey { /* private fields */ }Expand description
Wraps a private SecKeyRef.
Implementations§
Source§impl PrivateKey
impl PrivateKey
Sourcepub fn from_data(
data: &[u8],
key_type: KeyType,
key_size_bits: usize,
) -> Result<Self>
pub fn from_data( data: &[u8], key_type: KeyType, key_size_bits: usize, ) -> Result<Self>
Wraps the corresponding private SecKeyRef operation.
Sourcepub fn import_item(
data: &[u8],
file_name_or_extension: Option<&str>,
format: ExternalFormat,
item_type: ExternalItemType,
) -> Result<Self>
pub fn import_item( data: &[u8], file_name_or_extension: Option<&str>, format: ExternalFormat, item_type: ExternalItemType, ) -> Result<Self>
Wraps the corresponding private SecKeyRef operation.
Sourcepub fn import_pem(pem: &[u8]) -> Result<Self>
pub fn import_pem(pem: &[u8]) -> Result<Self>
Wraps the corresponding private SecKeyRef operation.
Sourcepub fn public_key(&self) -> Result<PublicKey>
pub fn public_key(&self) -> Result<PublicKey>
Wraps the corresponding private SecKeyRef operation.
Sourcepub fn attributes(&self) -> Result<Value>
pub fn attributes(&self) -> Result<Value>
Wraps the corresponding private SecKeyRef operation.
Sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
Wraps the corresponding private SecKeyRef operation.
Sourcepub fn external_representation(&self) -> Result<Vec<u8>>
pub fn external_representation(&self) -> Result<Vec<u8>>
Wraps the corresponding private SecKeyRef operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl !Send for PrivateKey
impl !Sync for PrivateKey
impl Unpin for PrivateKey
impl UnsafeUnpin for PrivateKey
impl UnwindSafe for PrivateKey
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