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§
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
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.