Struct veilid_core::CryptoSystemVLD0
source · pub struct CryptoSystemVLD0 { /* private fields */ }
Expand description
V0 CryptoSystem
Implementations§
Trait Implementations§
source§impl Clone for CryptoSystemVLD0
impl Clone for CryptoSystemVLD0
source§fn clone(&self) -> CryptoSystemVLD0
fn clone(&self) -> CryptoSystemVLD0
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CryptoSystem for CryptoSystemVLD0
impl CryptoSystem for CryptoSystemVLD0
fn kind(&self) -> CryptoKind
fn crypto(&self) -> Crypto
fn cached_dh( &self, key: &PublicKey, secret: &SecretKey ) -> VeilidAPIResult<SharedSecret>
fn random_bytes(&self, len: u32) -> Vec<u8> ⓘ
fn default_salt_length(&self) -> u32
fn hash_password(&self, password: &[u8], salt: &[u8]) -> VeilidAPIResult<String>
fn verify_password( &self, password: &[u8], password_hash: &str ) -> VeilidAPIResult<bool>
fn random_nonce(&self) -> Nonce
fn compute_dh( &self, key: &PublicKey, secret: &SecretKey ) -> VeilidAPIResult<SharedSecret>
fn generate_keypair(&self) -> KeyPair
fn generate_hash(&self, data: &[u8]) -> PublicKey
fn generate_hash_reader( &self, reader: &mut dyn Read ) -> VeilidAPIResult<PublicKey>
fn validate_keypair( &self, dht_key: &PublicKey, dht_key_secret: &SecretKey ) -> bool
fn validate_hash(&self, data: &[u8], dht_key: &PublicKey) -> bool
fn validate_hash_reader( &self, reader: &mut dyn Read, dht_key: &PublicKey ) -> VeilidAPIResult<bool>
fn distance(&self, key1: &PublicKey, key2: &PublicKey) -> CryptoKeyDistance
fn sign( &self, dht_key: &PublicKey, dht_key_secret: &SecretKey, data: &[u8] ) -> VeilidAPIResult<Signature>
fn verify( &self, dht_key: &PublicKey, data: &[u8], signature: &Signature ) -> VeilidAPIResult<()>
fn aead_overhead(&self) -> usize
fn decrypt_in_place_aead( &self, body: &mut Vec<u8>, nonce: &Nonce, shared_secret: &SharedSecret, associated_data: Option<&[u8]> ) -> VeilidAPIResult<()>
fn decrypt_aead( &self, body: &[u8], nonce: &Nonce, shared_secret: &SharedSecret, associated_data: Option<&[u8]> ) -> VeilidAPIResult<Vec<u8>>
fn encrypt_in_place_aead( &self, body: &mut Vec<u8>, nonce: &Nonce, shared_secret: &SharedSecret, associated_data: Option<&[u8]> ) -> VeilidAPIResult<()>
fn encrypt_aead( &self, body: &[u8], nonce: &Nonce, shared_secret: &SharedSecret, associated_data: Option<&[u8]> ) -> VeilidAPIResult<Vec<u8>>
fn crypt_in_place_no_auth( &self, body: &mut [u8], nonce: &[u8; 24], shared_secret: &SharedSecret )
fn crypt_b2b_no_auth( &self, in_buf: &[u8], out_buf: &mut [u8], nonce: &[u8; 24], shared_secret: &SharedSecret )
fn crypt_no_auth_aligned_8( &self, in_buf: &[u8], nonce: &[u8; 24], shared_secret: &SharedSecret ) -> Vec<u8> ⓘ
fn crypt_no_auth_unaligned( &self, in_buf: &[u8], nonce: &[u8; 24], shared_secret: &SharedSecret ) -> Vec<u8> ⓘ
Auto Trait Implementations§
impl Freeze for CryptoSystemVLD0
impl !RefUnwindSafe for CryptoSystemVLD0
impl Send for CryptoSystemVLD0
impl Sync for CryptoSystemVLD0
impl Unpin for CryptoSystemVLD0
impl !UnwindSafe for CryptoSystemVLD0
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