Struct security_framework::key::GenerateKeyOptions
source · pub struct GenerateKeyOptions {
pub key_type: Option<KeyType>,
pub size_in_bits: Option<u32>,
pub label: Option<String>,
pub token: Option<Token>,
pub location: Option<Location>,
}Expand description
Helper for creating CFDictionary attributes for SecKey::generate
Recommended reading:
https://developer.apple.com/documentation/technotes/tn3137-on-mac-keychains
Fields§
§key_type: Option<KeyType>kSecAttrKeyType
size_in_bits: Option<u32>kSecAttrKeySizeInBits
label: Option<String>kSecAttrLabel
token: Option<Token>kSecAttrTokenID
location: Option<Location>Which keychain to store the key in, if any.
Implementations§
source§impl GenerateKeyOptions
impl GenerateKeyOptions
sourcepub fn set_key_type(&mut self, key_type: KeyType) -> &mut Self
pub fn set_key_type(&mut self, key_type: KeyType) -> &mut Self
Set key_type
sourcepub fn set_size_in_bits(&mut self, size_in_bits: u32) -> &mut Self
pub fn set_size_in_bits(&mut self, size_in_bits: u32) -> &mut Self
Set size_in_bits
sourcepub fn set_location(&mut self, location: Location) -> &mut Self
pub fn set_location(&mut self, location: Location) -> &mut Self
Set location
sourcepub fn to_dictionary(&self) -> CFDictionary
pub fn to_dictionary(&self) -> CFDictionary
Collect options into a CFDictioanry
Trait Implementations§
source§impl Default for GenerateKeyOptions
impl Default for GenerateKeyOptions
source§fn default() -> GenerateKeyOptions
fn default() -> GenerateKeyOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for GenerateKeyOptions
impl !Send for GenerateKeyOptions
impl !Sync for GenerateKeyOptions
impl Unpin for GenerateKeyOptions
impl UnwindSafe for GenerateKeyOptions
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