Skip to main content

SubtleCryptoMethods

Trait SubtleCryptoMethods 

Source
pub trait SubtleCryptoMethods<D>
where D: DomTypes,
{
Show 19 methods // Required methods fn Encrypt( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn Decrypt( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn Sign( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn Verify( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, signature: ArrayBufferViewOrArrayBuffer, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn Digest( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn GenerateKey( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn DeriveKey( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, baseKey: &<D as DomTypes>::CryptoKey, derivedKeyType: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn DeriveBits( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, baseKey: &<D as DomTypes>::CryptoKey, length: Option<u32>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn ImportKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, keyData: ArrayBufferViewOrArrayBufferOrJsonWebKey, algorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn ExportKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, key: &<D as DomTypes>::CryptoKey, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn WrapKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, key: &<D as DomTypes>::CryptoKey, wrappingKey: &<D as DomTypes>::CryptoKey, wrapAlgorithm: ObjectOrString, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn UnwrapKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, wrappedKey: ArrayBufferViewOrArrayBuffer, unwrappingKey: &<D as DomTypes>::CryptoKey, unwrapAlgorithm: ObjectOrString, unwrappedKeyAlgorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn EncapsulateKey( &self, realm: &mut CurrentRealm<'_>, encapsulationAlgorithm: ObjectOrString, encapsulationKey: &<D as DomTypes>::CryptoKey, sharedKeyAlgorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn EncapsulateBits( &self, realm: &mut CurrentRealm<'_>, encapsulationAlgorithm: ObjectOrString, encapsulationKey: &<D as DomTypes>::CryptoKey, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn DecapsulateKey( &self, realm: &mut CurrentRealm<'_>, decapsulationAlgorithm: ObjectOrString, decapsulationKey: &<D as DomTypes>::CryptoKey, ciphertext: ArrayBufferViewOrArrayBuffer, sharedKeyAlgorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn DecapsulateBits( &self, realm: &mut CurrentRealm<'_>, decapsulationAlgorithm: ObjectOrString, decapsulationKey: &<D as DomTypes>::CryptoKey, ciphertext: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn GetPublicKey( &self, realm: &mut CurrentRealm<'_>, key: &<D as DomTypes>::CryptoKey, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot; fn Supports( cx: &mut JSContext, global: &<D as DomTypes>::GlobalScope, operation: DOMString, algorithm: ObjectOrString, length: Option<u32>, ) -> bool; fn Supports_( cx: &mut JSContext, global: &<D as DomTypes>::GlobalScope, operation: DOMString, algorithm: ObjectOrString, additionalAlgorithm: ObjectOrString, ) -> bool;
}

Required Methods§

Source

fn Encrypt( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn Decrypt( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn Sign( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn Verify( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &<D as DomTypes>::CryptoKey, signature: ArrayBufferViewOrArrayBuffer, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn Digest( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn GenerateKey( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn DeriveKey( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, baseKey: &<D as DomTypes>::CryptoKey, derivedKeyType: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn DeriveBits( &self, realm: &mut CurrentRealm<'_>, algorithm: ObjectOrString, baseKey: &<D as DomTypes>::CryptoKey, length: Option<u32>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn ImportKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, keyData: ArrayBufferViewOrArrayBufferOrJsonWebKey, algorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn ExportKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, key: &<D as DomTypes>::CryptoKey, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn WrapKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, key: &<D as DomTypes>::CryptoKey, wrappingKey: &<D as DomTypes>::CryptoKey, wrapAlgorithm: ObjectOrString, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn UnwrapKey( &self, realm: &mut CurrentRealm<'_>, format: KeyFormat, wrappedKey: ArrayBufferViewOrArrayBuffer, unwrappingKey: &<D as DomTypes>::CryptoKey, unwrapAlgorithm: ObjectOrString, unwrappedKeyAlgorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn EncapsulateKey( &self, realm: &mut CurrentRealm<'_>, encapsulationAlgorithm: ObjectOrString, encapsulationKey: &<D as DomTypes>::CryptoKey, sharedKeyAlgorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn EncapsulateBits( &self, realm: &mut CurrentRealm<'_>, encapsulationAlgorithm: ObjectOrString, encapsulationKey: &<D as DomTypes>::CryptoKey, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn DecapsulateKey( &self, realm: &mut CurrentRealm<'_>, decapsulationAlgorithm: ObjectOrString, decapsulationKey: &<D as DomTypes>::CryptoKey, ciphertext: ArrayBufferViewOrArrayBuffer, sharedKeyAlgorithm: ObjectOrString, extractable: bool, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn DecapsulateBits( &self, realm: &mut CurrentRealm<'_>, decapsulationAlgorithm: ObjectOrString, decapsulationKey: &<D as DomTypes>::CryptoKey, ciphertext: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn GetPublicKey( &self, realm: &mut CurrentRealm<'_>, key: &<D as DomTypes>::CryptoKey, keyUsages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source

fn Supports( cx: &mut JSContext, global: &<D as DomTypes>::GlobalScope, operation: DOMString, algorithm: ObjectOrString, length: Option<u32>, ) -> bool

Source

fn Supports_( cx: &mut JSContext, global: &<D as DomTypes>::GlobalScope, operation: DOMString, algorithm: ObjectOrString, additionalAlgorithm: ObjectOrString, ) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<D> SubtleCryptoMethods<D> for SubtleCrypto<D>

Source§

fn Encrypt( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &CryptoKey<D>, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn Decrypt( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &CryptoKey<D>, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn Sign( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &CryptoKey<D>, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn Verify( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, key: &CryptoKey<D>, signature: ArrayBufferViewOrArrayBuffer, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn Digest( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, data: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn GenerateKey( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, extractable: bool, key_usages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn DeriveKey( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, base_key: &CryptoKey<D>, derived_key_type: ObjectOrString, extractable: bool, usages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn DeriveBits( &self, cx: &mut CurrentRealm<'_>, algorithm: ObjectOrString, base_key: &CryptoKey<D>, length: Option<u32>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn ImportKey( &self, cx: &mut CurrentRealm<'_>, format: KeyFormat, key_data: ArrayBufferViewOrArrayBufferOrJsonWebKey, algorithm: ObjectOrString, extractable: bool, key_usages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn ExportKey( &self, cx: &mut CurrentRealm<'_>, format: KeyFormat, key: &CryptoKey<D>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn WrapKey( &self, cx: &mut CurrentRealm<'_>, format: KeyFormat, key: &CryptoKey<D>, wrapping_key: &CryptoKey<D>, algorithm: ObjectOrString, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn UnwrapKey( &self, cx: &mut CurrentRealm<'_>, format: KeyFormat, wrapped_key: ArrayBufferViewOrArrayBuffer, unwrapping_key: &CryptoKey<D>, algorithm: ObjectOrString, unwrapped_key_algorithm: ObjectOrString, extractable: bool, usages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn EncapsulateKey( &self, cx: &mut CurrentRealm<'_>, encapsulation_algorithm: ObjectOrString, encapsulation_key: &CryptoKey<D>, shared_key_algorithm: ObjectOrString, extractable: bool, usages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn EncapsulateBits( &self, cx: &mut CurrentRealm<'_>, encapsulation_algorithm: ObjectOrString, encapsulation_key: &CryptoKey<D>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn DecapsulateKey( &self, cx: &mut CurrentRealm<'_>, decapsulation_algorithm: ObjectOrString, decapsulation_key: &CryptoKey<D>, ciphertext: ArrayBufferViewOrArrayBuffer, shared_key_algorithm: ObjectOrString, extractable: bool, usages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn DecapsulateBits( &self, cx: &mut CurrentRealm<'_>, decapsulation_algorithm: ObjectOrString, decapsulation_key: &CryptoKey<D>, ciphertext: ArrayBufferViewOrArrayBuffer, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn GetPublicKey( &self, cx: &mut CurrentRealm<'_>, key: &CryptoKey<D>, usages: Vec<KeyUsage>, ) -> <<D as DomTypes>::Promise as PromiseHelpers<D>>::StackRoot

Source§

fn Supports( cx: &mut JSContext, _global: &<D as DomTypes>::GlobalScope, operation: DOMString, algorithm: ObjectOrString, length: Option<u32>, ) -> bool

Source§

fn Supports_( cx: &mut JSContext, _global: &<D as DomTypes>::GlobalScope, operation: DOMString, algorithm: ObjectOrString, additional_algorithm: ObjectOrString, ) -> bool

Implementors§