Struct ockam_vault_sync_core::VaultSync[][src]

pub struct VaultSync { /* fields omitted */ }
Expand description

Vault sync wrapper

Implementations

impl VaultSync[src]

pub fn start_another(&self) -> Result<Self>[src]

Start another Vault at the same address.

impl VaultSync[src]

pub fn create_with_worker(ctx: &Context, vault: &Address) -> Result<Self>[src]

Create and start a new Vault using Worker.

pub fn create<T: VaultTrait>(ctx: &Context, vault: T) -> Result<Self>[src]

Start a Vault.

Trait Implementations

impl AsymmetricVault for VaultSync[src]

fn ec_diffie_hellman(
    &mut self,
    context: &Secret,
    peer_public_key: &PublicKey
) -> Result<Secret>
[src]

Compute Elliptic-Curve Diffie-Hellman using this secret key and the specified uncompressed public key Read more

impl Clone for VaultSync[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Hasher for VaultSync[src]

fn sha256(&mut self, data: &[u8]) -> Result<[u8; 32]>[src]

Compute the SHA-256 digest given input data

fn hkdf_sha256(
    &mut self,
    salt: &Secret,
    info: &[u8],
    ikm: Option<&Secret>,
    output_attributes: SmallBuffer<SecretAttributes>
) -> Result<SmallBuffer<Secret>>
[src]

Derive multiple output Secrets with given attributes using the HKDF-SHA256 using specified salt, input key material and info. Read more

impl KeyIdVault for VaultSync[src]

fn get_secret_by_key_id(&mut self, key_id: &str) -> Result<Secret>[src]

Return Secret for given key id

fn compute_key_id_for_public_key(
    &mut self,
    public_key: &PublicKey
) -> Result<KeyId>
[src]

Return KeyId for given public key

impl SecretVault for VaultSync[src]

fn secret_generate(&mut self, attributes: SecretAttributes) -> Result<Secret>[src]

Generate fresh secret with given attributes

fn secret_import(
    &mut self,
    secret: &[u8],
    attributes: SecretAttributes
) -> Result<Secret>
[src]

Import a secret with given attributes from binary form into the vault

fn secret_export(&mut self, context: &Secret) -> Result<SecretKey>[src]

Export a secret key to the binary form represented as SecretKey

fn secret_attributes_get(
    &mut self,
    context: &Secret
) -> Result<SecretAttributes>
[src]

Get the attributes for a secret

fn secret_public_key_get(&mut self, context: &Secret) -> Result<PublicKey>[src]

Return the associated public key given the secret key

fn secret_destroy(&mut self, context: Secret) -> Result<()>[src]

Remove a secret from the vault

impl Signer for VaultSync[src]

fn sign(&mut self, secret_key: &Secret, data: &[u8]) -> Result<[u8; 64]>[src]

Generate a signature for given data using given secret key

impl SymmetricVault for VaultSync[src]

fn aead_aes_gcm_encrypt(
    &mut self,
    context: &Secret,
    plaintext: &[u8],
    nonce: &[u8],
    aad: &[u8]
) -> Result<Buffer<u8>>
[src]

Encrypt a payload using AES-GCM

fn aead_aes_gcm_decrypt(
    &mut self,
    context: &Secret,
    cipher_text: &[u8],
    nonce: &[u8],
    aad: &[u8]
) -> Result<Buffer<u8>>
[src]

Decrypt a payload using AES-GCM

impl Verifier for VaultSync[src]

fn verify(
    &mut self,
    signature: &[u8; 64],
    public_key: &PublicKey,
    data: &[u8]
) -> Result<bool>
[src]

Verify a signature for given data using given public key

impl Zeroize for VaultSync[src]

fn zeroize(&mut self)[src]

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

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]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V