Struct fog_crypto::identity::ContainedIdKey [−][src]
A self-contained implementor of SignInterface. It’s expected this will be used unless the key
is being managed by the OS or a hardware module.
Implementations
impl ContainedIdKey[src]
pub fn generate<R>(csprng: &mut R) -> Self where
R: CryptoRng + RngCore, [src]
R: CryptoRng + RngCore,
Generate a new key given a cryptographic random number generator.
pub fn with_version<R>(csprng: &mut R, version: u8) -> Result<Self, CryptoError> where
R: CryptoRng + RngCore, [src]
R: CryptoRng + RngCore,
Generate a new key with a specific version, given a cryptographic random number generator. Fails if the version isn’t supported.
pub fn encode_vec(&self, buf: &mut Vec<u8>)[src]
Encode the raw key, prepended with the version byte. The output vector must be either zeroized or encrypted before being dropped.
Trait Implementations
impl SignInterface for ContainedIdKey[src]
fn sign(&self, hash: &Hash) -> Signature[src]
fn id(&self) -> &Identity[src]
fn self_export_lock(
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<IdentityLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<IdentityLockbox>
fn self_export_stream(
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<IdentityLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<IdentityLockbox>
impl TryFrom<&'_ [u8]> for ContainedIdKey[src]
Auto Trait Implementations
impl RefUnwindSafe for ContainedIdKey
impl Send for ContainedIdKey
impl Sync for ContainedIdKey
impl Unpin for ContainedIdKey
impl UnwindSafe for ContainedIdKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,