[][src]Trait wasi_crypto_preview::wasi_ephemeral_crypto_asymmetric_common::WasiEphemeralCryptoAsymmetricCommon

pub trait WasiEphemeralCryptoAsymmetricCommon {
    fn keypair_generate<'a>(
        &self,
        algorithm_type: AlgorithmType,
        algorithm: &GuestPtr<'a, str>,
        options: &OptOptions
    ) -> Result<Keypair, CryptoErrno>;
fn keypair_import<'a>(
        &self,
        algorithm_type: AlgorithmType,
        algorithm: &GuestPtr<'a, str>,
        encoded: &GuestPtr<'a, u8>,
        encoded_len: Size,
        encoding: KeypairEncoding
    ) -> Result<Keypair, CryptoErrno>;
fn keypair_generate_managed<'a>(
        &self,
        key_manager: KeyManager,
        algorithm_type: AlgorithmType,
        algorithm: &GuestPtr<'a, str>,
        options: &OptOptions
    ) -> Result<Keypair, CryptoErrno>;
fn keypair_replace_managed(
        &self,
        key_manager: KeyManager,
        kp_old: Keypair,
        kp_new: Keypair
    ) -> Result<Version, CryptoErrno>;
fn keypair_id<'a>(
        &self,
        kp: Keypair,
        kp_id: &GuestPtr<'a, u8>,
        kp_id_max_len: Size
    ) -> Result<(Size, Version), CryptoErrno>;
fn keypair_from_id<'a>(
        &self,
        key_manager: KeyManager,
        kp_id: &GuestPtr<'a, u8>,
        kp_id_len: Size,
        kp_version: Version
    ) -> Result<Keypair, CryptoErrno>;
fn keypair_from_pk_and_sk(
        &self,
        publickey: Publickey,
        secretkey: Secretkey
    ) -> Result<Keypair, CryptoErrno>;
fn keypair_export(
        &self,
        kp: Keypair,
        encoding: KeypairEncoding
    ) -> Result<ArrayOutput, CryptoErrno>;
fn keypair_publickey(&self, kp: Keypair) -> Result<Publickey, CryptoErrno>;
fn keypair_secretkey(&self, kp: Keypair) -> Result<Secretkey, CryptoErrno>;
fn keypair_close(&self, kp: Keypair) -> Result<(), CryptoErrno>;
fn publickey_import<'a>(
        &self,
        algorithm_type: AlgorithmType,
        algorithm: &GuestPtr<'a, str>,
        encoded: &GuestPtr<'a, u8>,
        encoded_len: Size,
        encoding: PublickeyEncoding
    ) -> Result<Publickey, CryptoErrno>;
fn publickey_export(
        &self,
        pk: Publickey,
        encoding: PublickeyEncoding
    ) -> Result<ArrayOutput, CryptoErrno>;
fn publickey_verify(&self, pk: Publickey) -> Result<(), CryptoErrno>;
fn publickey_from_secretkey(
        &self,
        sk: Secretkey
    ) -> Result<Publickey, CryptoErrno>;
fn publickey_close(&self, pk: Publickey) -> Result<(), CryptoErrno>;
fn secretkey_import<'a>(
        &self,
        algorithm_type: AlgorithmType,
        algorithm: &GuestPtr<'a, str>,
        encoded: &GuestPtr<'a, u8>,
        encoded_len: Size,
        encoding: SecretkeyEncoding
    ) -> Result<Secretkey, CryptoErrno>;
fn secretkey_export(
        &self,
        sk: Secretkey,
        encoding: SecretkeyEncoding
    ) -> Result<ArrayOutput, CryptoErrno>;
fn secretkey_close(&self, sk: Secretkey) -> Result<(), CryptoErrno>; }

Required methods

fn keypair_generate<'a>(
    &self,
    algorithm_type: AlgorithmType,
    algorithm: &GuestPtr<'a, str>,
    options: &OptOptions
) -> Result<Keypair, CryptoErrno>

fn keypair_import<'a>(
    &self,
    algorithm_type: AlgorithmType,
    algorithm: &GuestPtr<'a, str>,
    encoded: &GuestPtr<'a, u8>,
    encoded_len: Size,
    encoding: KeypairEncoding
) -> Result<Keypair, CryptoErrno>

fn keypair_generate_managed<'a>(
    &self,
    key_manager: KeyManager,
    algorithm_type: AlgorithmType,
    algorithm: &GuestPtr<'a, str>,
    options: &OptOptions
) -> Result<Keypair, CryptoErrno>

fn keypair_replace_managed(
    &self,
    key_manager: KeyManager,
    kp_old: Keypair,
    kp_new: Keypair
) -> Result<Version, CryptoErrno>

fn keypair_id<'a>(
    &self,
    kp: Keypair,
    kp_id: &GuestPtr<'a, u8>,
    kp_id_max_len: Size
) -> Result<(Size, Version), CryptoErrno>

fn keypair_from_id<'a>(
    &self,
    key_manager: KeyManager,
    kp_id: &GuestPtr<'a, u8>,
    kp_id_len: Size,
    kp_version: Version
) -> Result<Keypair, CryptoErrno>

fn keypair_from_pk_and_sk(
    &self,
    publickey: Publickey,
    secretkey: Secretkey
) -> Result<Keypair, CryptoErrno>

fn keypair_export(
    &self,
    kp: Keypair,
    encoding: KeypairEncoding
) -> Result<ArrayOutput, CryptoErrno>

fn keypair_publickey(&self, kp: Keypair) -> Result<Publickey, CryptoErrno>

fn keypair_secretkey(&self, kp: Keypair) -> Result<Secretkey, CryptoErrno>

fn keypair_close(&self, kp: Keypair) -> Result<(), CryptoErrno>

fn publickey_import<'a>(
    &self,
    algorithm_type: AlgorithmType,
    algorithm: &GuestPtr<'a, str>,
    encoded: &GuestPtr<'a, u8>,
    encoded_len: Size,
    encoding: PublickeyEncoding
) -> Result<Publickey, CryptoErrno>

fn publickey_export(
    &self,
    pk: Publickey,
    encoding: PublickeyEncoding
) -> Result<ArrayOutput, CryptoErrno>

fn publickey_verify(&self, pk: Publickey) -> Result<(), CryptoErrno>

fn publickey_from_secretkey(
    &self,
    sk: Secretkey
) -> Result<Publickey, CryptoErrno>

fn publickey_close(&self, pk: Publickey) -> Result<(), CryptoErrno>

fn secretkey_import<'a>(
    &self,
    algorithm_type: AlgorithmType,
    algorithm: &GuestPtr<'a, str>,
    encoded: &GuestPtr<'a, u8>,
    encoded_len: Size,
    encoding: SecretkeyEncoding
) -> Result<Secretkey, CryptoErrno>

fn secretkey_export(
    &self,
    sk: Secretkey,
    encoding: SecretkeyEncoding
) -> Result<ArrayOutput, CryptoErrno>

fn secretkey_close(&self, sk: Secretkey) -> Result<(), CryptoErrno>

Loading content...

Implementors

impl WasiEphemeralCryptoAsymmetricCommon for WasiCryptoCtx[src]

Loading content...