pub struct InviteSecret(/* private fields */);Expand description
The one-time invite secret lets a person ask to join, not open the store (§13.2).
Implementations§
Source§impl InviteSecret
impl InviteSecret
Sourcepub fn generate() -> Result<Self, CryptoError>
pub fn generate() -> Result<Self, CryptoError>
Make an invite secret using the operating system’s randomness.
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Import the secret carried by a scanned invite (§13.2).
Sourcepub fn to_secret_bytes(&self) -> SecretBytes
pub fn to_secret_bytes(&self) -> SecretBytes
Encode the secret for the invite code, keeping its allocation zeroizing.
Sourcepub fn join_request_key(&self) -> EncryptionKey
pub fn join_request_key(&self) -> EncryptionKey
Derive the join request’s encryption key with its own HKDF label (Appendix D).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InviteSecret
impl RefUnwindSafe for InviteSecret
impl Send for InviteSecret
impl Sync for InviteSecret
impl Unpin for InviteSecret
impl UnsafeUnpin for InviteSecret
impl UnwindSafe for InviteSecret
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