Struct fortresscrypto::NetworkKeySuite
source · [−]pub struct NetworkKeySuite {
pub login_key: LoginKey,
/* private fields */
}
Fields
login_key: LoginKey
Implementations
sourceimpl NetworkKeySuite
impl NetworkKeySuite
sourcepub fn derive(username: &[u8], password: &[u8]) -> NetworkKeySuite
pub fn derive(username: &[u8], password: &[u8]) -> NetworkKeySuite
Derive from username and password using a very aggressive KDF. This function call will take a long time to finish (5 minutes or more).
pub fn encrypt_object(&self, id: &[u8], data: &[u8]) -> EncryptedObject
pub fn decrypt_object(
&self,
id: &[u8],
encrypted_object: &EncryptedObject
) -> Result<Vec<u8>, CryptoError>
Trait Implementations
sourceimpl Clone for NetworkKeySuite
impl Clone for NetworkKeySuite
sourcefn clone(&self) -> NetworkKeySuite
fn clone(&self) -> NetworkKeySuite
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for NetworkKeySuite
impl Debug for NetworkKeySuite
sourceimpl<'de> Deserialize<'de> for NetworkKeySuite
impl<'de> Deserialize<'de> for NetworkKeySuite
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<NetworkKeySuite> for NetworkKeySuite
impl PartialEq<NetworkKeySuite> for NetworkKeySuite
sourcefn eq(&self, other: &NetworkKeySuite) -> bool
fn eq(&self, other: &NetworkKeySuite) -> bool
sourceimpl Serialize for NetworkKeySuite
impl Serialize for NetworkKeySuite
impl Eq for NetworkKeySuite
impl StructuralEq for NetworkKeySuite
impl StructuralPartialEq for NetworkKeySuite
Auto Trait Implementations
impl RefUnwindSafe for NetworkKeySuite
impl Send for NetworkKeySuite
impl Sync for NetworkKeySuite
impl Unpin for NetworkKeySuite
impl UnwindSafe for NetworkKeySuite
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more