[−][src]Enum cryptouri::secret_key::SecretKey
Secret key algorithms
Variants
Aes128Gcm(Aes128GcmKey)
AES-128 in Galois Counter Mode
Aes256Gcm(Aes256GcmKey)
AES-256 in Galois Counter Mode
Ed25519(Ed25519SecretKey)
Ed25519 private scalar
Methods
impl SecretKey
[src]
pub fn new(alg: &str, slice: &[u8]) -> Result<Self, Error>
[src]
Create a new SecretKey
for the given algorithm
pub fn aes128gcm_key(&self) -> Option<&Aes128GcmKey>
[src]
Return an Aes128GcmKey
if the underlying secret key is AES-128-GCM
pub fn is_aes128gcm_key(&self) -> bool
[src]
Is this SecretKey
an AES-128-GCM secret key?
pub fn aes256gcm_key(&self) -> Option<&Aes256GcmKey>
[src]
Return an Aes256GcmKey
if the underlying secret key is AES-256-GCM
pub fn is_aes256gcm_key(&self) -> bool
[src]
Is this SecretKey
an AES-256-GCM secret key?
pub fn ed25519_key(&self) -> Option<&Ed25519SecretKey>
[src]
Return an Ed25519SecretKey
if the underlying secret key is Ed25519
pub fn is_ed25519_key(&self) -> bool
[src]
Is this SecretKey
an Ed25519 secret key?
Trait Implementations
impl Encodable for SecretKey
[src]
fn to_uri_string(&self) -> String
[src]
Serialize this SecretKey
as a URI-encoded String
fn to_dasherized_string(&self) -> String
[src]
Serialize this SecretKey
as a "dasherized" String
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self