[][src]Struct wasi_crypto_preview::CryptoCtx

pub struct CryptoCtx { /* fields omitted */ }

Implementations

impl CryptoCtx[src]

pub fn array_output_len(
    &self,
    array_output_handle: Handle
) -> Result<usize, CryptoError>
[src]

pub fn array_output_pull(
    &self,
    array_output_handle: Handle,
    buf: &mut [u8]
) -> Result<usize, CryptoError>
[src]

impl CryptoCtx[src]

pub fn keypair_generate(
    &self,
    alg_type: AlgorithmType,
    alg_str: &str,
    options_handle: Option<Handle>
) -> Result<Handle, CryptoError>
[src]

pub fn keypair_import(
    &self,
    alg_type: AlgorithmType,
    alg_str: &str,
    encoded: &[u8],
    encoding: KeyPairEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn keypair_id(
    &self,
    kp_handle: Handle
) -> Result<(Vec<u8>, Version), CryptoError>
[src]

pub fn keypair_from_pk_and_sk(
    &self,
    pk_handle: Handle,
    sk_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn keypair_export(
    &self,
    kp_handle: Handle,
    encoding: KeyPairEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn keypair_publickey(
    &self,
    kp_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn keypair_secretkey(
    &self,
    kp_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn keypair_close(&self, kp_handle: Handle) -> Result<(), CryptoError>[src]

impl CryptoCtx[src]

pub fn keypair_generate_managed(
    &self,
    _key_manager_handle: Handle,
    _alg_type: AlgorithmType,
    _alg_str: &str,
    _options_handle: Option<Handle>
) -> Result<Handle, CryptoError>
[src]

pub fn keypair_replace_managed(
    &self,
    _key_manager_handle: Handle,
    kp_old_handle: Handle,
    kp_new_handle: Handle
) -> Result<Version, CryptoError>
[src]

pub fn keypair_from_id(
    &self,
    _key_manager_handle: Handle,
    _symmetric_key_id: &[u8],
    _symmetric_key_version: Version
) -> Result<Handle, CryptoError>
[src]

impl CryptoCtx[src]

pub fn publickey_import(
    &self,
    alg_type: AlgorithmType,
    alg_str: &str,
    encoded: &[u8],
    encoding: PublicKeyEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn publickey_export(
    &self,
    pk_handle: Handle,
    encoding: PublicKeyEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn publickey_verify(&self, pk: Handle) -> Result<(), CryptoError>[src]

pub fn publickey_close(&self, pk: Handle) -> Result<(), CryptoError>[src]

impl CryptoCtx[src]

pub fn secretkey_import(
    &self,
    alg_type: AlgorithmType,
    alg_str: &str,
    encoded: &[u8],
    encoding: SecretKeyEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn secretkey_export(
    &self,
    sk_handle: Handle,
    encoding: SecretKeyEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn publickey(&self, sk_handle: Handle) -> Result<Handle, CryptoError>[src]

pub fn secretkey_close(&self, sk: Handle) -> Result<(), CryptoError>[src]

impl CryptoCtx[src]

pub fn kx_encapsulate(
    &self,
    pk_handle: Handle
) -> Result<(Handle, Handle), CryptoError>
[src]

impl CryptoCtx[src]

pub fn kx_dh(
    &self,
    pk_handle: Handle,
    sk_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn kx_decapsulate(
    &self,
    sk_handle: Handle,
    encapsulated_secret: &[u8]
) -> Result<Handle, CryptoError>
[src]

impl CryptoCtx[src]

pub fn key_manager_open(
    &self,
    _options: Option<Handle>
) -> Result<Handle, CryptoError>
[src]

pub fn key_manager_close(
    &self,
    _key_manager_handle: Handle
) -> Result<(), CryptoError>
[src]

pub fn key_manager_invalidate(
    &self,
    _key_manager_handle: Handle,
    _key_id: &[u8],
    _key_version: Version
) -> Result<(), CryptoError>
[src]

impl CryptoCtx[src]

pub fn options_open(
    &self,
    algorithm_type: AlgorithmType
) -> Result<Handle, CryptoError>
[src]

pub fn options_close(&self, options_handle: Handle) -> Result<(), CryptoError>[src]

pub fn options_set(
    &self,
    options_handle: Handle,
    name: &str,
    value: &[u8]
) -> Result<(), CryptoError>
[src]

pub fn options_set_guest_buffer(
    &self,
    options_handle: Handle,
    name: &str,
    buffer: &'static mut [u8]
) -> Result<(), CryptoError>
[src]

pub fn options_set_u64(
    &self,
    options_handle: Handle,
    name: &str,
    value: u64
) -> Result<(), CryptoError>
[src]

pub fn options_get(
    &self,
    options_handle: Handle,
    name: &str,
    value: &mut [u8]
) -> Result<usize, CryptoError>
[src]

pub fn options_get_u64(
    &self,
    options_handle: Handle,
    name: &str
) -> Result<u64, CryptoError>
[src]

impl CryptoCtx[src]

pub fn signature_export(
    &self,
    signature_handle: Handle,
    encoding: SignatureEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn signature_import(
    &self,
    alg_str: &str,
    encoded: &[u8],
    encoding: SignatureEncoding
) -> Result<Handle, CryptoError>
[src]

pub fn signature_state_open(
    &self,
    kp_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn signature_state_update(
    &self,
    state_handle: Handle,
    input: &[u8]
) -> Result<(), CryptoError>
[src]

pub fn signature_state_sign(
    &self,
    state_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn signature_state_close(&self, handle: Handle) -> Result<(), CryptoError>[src]

pub fn signature_verification_state_open(
    &self,
    pk_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn signature_verification_state_update(
    &self,
    verification_state_handle: Handle,
    input: &[u8]
) -> Result<(), CryptoError>
[src]

pub fn signature_verification_state_verify(
    &self,
    verification_state_handle: Handle,
    signature_handle: Handle
) -> Result<(), CryptoError>
[src]

pub fn signature_verification_state_close(
    &self,
    verification_state_handle: Handle
) -> Result<(), CryptoError>
[src]

pub fn signature_close(
    &self,
    signature_handle: Handle
) -> Result<(), CryptoError>
[src]

impl CryptoCtx[src]

pub fn symmetric_key_generate(
    &self,
    alg_str: &str,
    options_handle: Option<Handle>
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_key_import(
    &self,
    alg_str: &str,
    raw: &[u8]
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_key_export(
    &self,
    symmetric_key_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_key_id(
    &self,
    symmetric_key_handle: Handle
) -> Result<(Vec<u8>, Version), CryptoError>
[src]

pub fn symmetric_key_close(
    &self,
    symmetric_key_handle: Handle
) -> Result<(), CryptoError>
[src]

impl CryptoCtx[src]

pub fn symmetric_key_generate_managed(
    &self,
    _key_manager_handle: Handle,
    _alg_str: &str,
    _options_handle: Option<Handle>
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_key_replace_managed(
    &self,
    _key_manager_handle: Handle,
    kp_old_handle: Handle,
    kp_new_handle: Handle
) -> Result<Version, CryptoError>
[src]

pub fn symmetric_key_from_id(
    &self,
    _key_manager_handle: Handle,
    _symmetric_key_id: &[u8],
    _symmetric_key_version: Version
) -> Result<Handle, CryptoError>
[src]

impl CryptoCtx[src]

pub fn symmetric_state_open(
    &self,
    alg_str: &str,
    key_handle: Option<Handle>,
    options_handle: Option<Handle>
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_state_options_get(
    &self,
    symmetric_state_handle: Handle,
    name: &str,
    value: &mut [u8]
) -> Result<usize, CryptoError>
[src]

pub fn symmetric_state_options_get_u64(
    &self,
    symmetric_state_handle: Handle,
    name: &str
) -> Result<u64, CryptoError>
[src]

pub fn symmetric_state_close(
    &self,
    symmetric_state_handle: Handle
) -> Result<(), CryptoError>
[src]

pub fn symmetric_state_absorb(
    &self,
    symmetric_state_handle: Handle,
    data: &[u8]
) -> Result<(), CryptoError>
[src]

pub fn symmetric_state_squeeze(
    &self,
    symmetric_state_handle: Handle,
    out: &mut [u8]
) -> Result<(), CryptoError>
[src]

pub fn symmetric_state_squeeze_tag(
    &self,
    symmetric_state_handle: Handle
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_state_squeeze_key(
    &self,
    symmetric_state_handle: Handle,
    alg_str: &str
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_state_max_tag_len(
    &self,
    symmetric_state_handle: Handle
) -> Result<usize, CryptoError>
[src]

pub fn symmetric_state_encrypt(
    &self,
    symmetric_state_handle: Handle,
    out: &mut [u8],
    data: &[u8]
) -> Result<usize, CryptoError>
[src]

pub fn symmetric_state_encrypt_detached(
    &self,
    symmetric_state_handle: Handle,
    out: &mut [u8],
    data: &[u8]
) -> Result<Handle, CryptoError>
[src]

pub fn symmetric_state_decrypt(
    &self,
    symmetric_state_handle: Handle,
    out: &mut [u8],
    data: &[u8]
) -> Result<usize, CryptoError>
[src]

pub fn symmetric_state_decrypt_detached(
    &self,
    symmetric_state_handle: Handle,
    out: &mut [u8],
    data: &[u8],
    raw_tag: &[u8]
) -> Result<usize, CryptoError>
[src]

pub fn symmetric_state_ratchet(
    &self,
    symmetric_state_handle: Handle
) -> Result<(), CryptoError>
[src]

impl CryptoCtx[src]

pub fn symmetric_tag_len(
    &self,
    symmetric_tag_handle: Handle
) -> Result<usize, CryptoError>
[src]

pub fn symmetric_tag_pull(
    &self,
    symmetric_tag_handle: Handle,
    buf: &mut [u8]
) -> Result<usize, CryptoError>
[src]

pub fn symmetric_tag_verify(
    &self,
    symmetric_tag_handle: Handle,
    expected_raw: &[u8]
) -> Result<(), CryptoError>
[src]

pub fn symmetric_tag_close(
    &self,
    symmetric_tag_handle: Handle
) -> Result<(), CryptoError>
[src]

impl CryptoCtx[src]

pub fn new() -> Self[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

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

impl<T> Pointee for T[src]

type Pointer = u32

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]

type Error = Infallible

The type returned in the event of a conversion error.

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.