Struct script::dom::subtlecrypto::SubtleCrypto
source · #[repr(C)]pub struct SubtleCrypto {
reflector_: Reflector,
rng: DomRefCell<ServoRng>,
}
Fields§
§reflector_: Reflector
§rng: DomRefCell<ServoRng>
Implementations§
source§impl SubtleCrypto
impl SubtleCrypto
fn __assert_parent_type(&self)
source§impl SubtleCrypto
impl SubtleCrypto
fn new_inherited() -> SubtleCrypto
pub(crate) fn new(global: &GlobalScope) -> Root<Dom<SubtleCrypto>>
fn task_source_with_canceller( &self, ) -> (DOMManipulationTaskSource, TaskCanceller)
source§impl SubtleCrypto
impl SubtleCrypto
sourcefn encrypt_aes_cbc(
&self,
params: &SubtleAesCbcParams,
key: &CryptoKey,
data: &[u8],
cx: JSContext,
handle: MutableHandleObject<'_>,
) -> Result<Vec<u8>, Error>
fn encrypt_aes_cbc( &self, params: &SubtleAesCbcParams, key: &CryptoKey, data: &[u8], cx: JSContext, handle: MutableHandleObject<'_>, ) -> Result<Vec<u8>, Error>
sourcefn decrypt_aes_cbc(
&self,
params: &SubtleAesCbcParams,
key: &CryptoKey,
data: &[u8],
cx: JSContext,
handle: MutableHandleObject<'_>,
) -> Result<Vec<u8>, Error>
fn decrypt_aes_cbc( &self, params: &SubtleAesCbcParams, key: &CryptoKey, data: &[u8], cx: JSContext, handle: MutableHandleObject<'_>, ) -> Result<Vec<u8>, Error>
sourcefn encrypt_decrypt_aes_ctr(
&self,
params: &SubtleAesCtrParams,
key: &CryptoKey,
data: &[u8],
cx: JSContext,
handle: MutableHandleObject<'_>,
) -> Result<Vec<u8>, Error>
fn encrypt_decrypt_aes_ctr( &self, params: &SubtleAesCtrParams, key: &CryptoKey, data: &[u8], cx: JSContext, handle: MutableHandleObject<'_>, ) -> Result<Vec<u8>, Error>
sourcefn encrypt_aes_gcm(
&self,
params: &SubtleAesGcmParams,
key: &CryptoKey,
plaintext: &[u8],
cx: JSContext,
handle: MutableHandleObject<'_>,
) -> Result<Vec<u8>, Error>
fn encrypt_aes_gcm( &self, params: &SubtleAesGcmParams, key: &CryptoKey, plaintext: &[u8], cx: JSContext, handle: MutableHandleObject<'_>, ) -> Result<Vec<u8>, Error>
sourcefn decrypt_aes_gcm(
&self,
params: &SubtleAesGcmParams,
key: &CryptoKey,
ciphertext: &[u8],
cx: JSContext,
handle: MutableHandleObject<'_>,
) -> Result<Vec<u8>, Error>
fn decrypt_aes_gcm( &self, params: &SubtleAesGcmParams, key: &CryptoKey, ciphertext: &[u8], cx: JSContext, handle: MutableHandleObject<'_>, ) -> Result<Vec<u8>, Error>
sourcefn generate_key_aes(
&self,
usages: Vec<KeyUsage>,
key_gen_params: &SubtleAesKeyGenParams,
extractable: bool,
) -> Result<Root<Dom<CryptoKey>>, Error>
fn generate_key_aes( &self, usages: Vec<KeyUsage>, key_gen_params: &SubtleAesKeyGenParams, extractable: bool, ) -> Result<Root<Dom<CryptoKey>>, Error>
sourcefn generate_key_hmac(
&self,
usages: Vec<KeyUsage>,
params: &SubtleHmacKeyGenParams,
extractable: bool,
) -> Result<Root<Dom<CryptoKey>>, Error>
fn generate_key_hmac( &self, usages: Vec<KeyUsage>, params: &SubtleHmacKeyGenParams, extractable: bool, ) -> Result<Root<Dom<CryptoKey>>, Error>
sourcefn import_key_aes(
&self,
format: KeyFormat,
data: &[u8],
extractable: bool,
usages: Vec<KeyUsage>,
alg_name: &str,
) -> Result<Root<Dom<CryptoKey>>, Error>
fn import_key_aes( &self, format: KeyFormat, data: &[u8], extractable: bool, usages: Vec<KeyUsage>, alg_name: &str, ) -> Result<Root<Dom<CryptoKey>>, Error>
sourcefn export_key_aes(
&self,
format: KeyFormat,
key: &CryptoKey,
) -> Result<AesExportedKey, Error>
fn export_key_aes( &self, format: KeyFormat, key: &CryptoKey, ) -> Result<AesExportedKey, Error>
sourcefn import_key_hkdf(
&self,
format: KeyFormat,
data: &[u8],
extractable: bool,
usages: Vec<KeyUsage>,
) -> Result<Root<Dom<CryptoKey>>, Error>
fn import_key_hkdf( &self, format: KeyFormat, data: &[u8], extractable: bool, usages: Vec<KeyUsage>, ) -> Result<Root<Dom<CryptoKey>>, Error>
sourcefn import_key_hmac(
&self,
normalized_algorithm: &SubtleHmacImportParams,
format: KeyFormat,
key_data: &[u8],
extractable: bool,
usages: Vec<KeyUsage>,
) -> Result<Root<Dom<CryptoKey>>, Error>
fn import_key_hmac( &self, normalized_algorithm: &SubtleHmacImportParams, format: KeyFormat, key_data: &[u8], extractable: bool, usages: Vec<KeyUsage>, ) -> Result<Root<Dom<CryptoKey>>, Error>
sourcefn wrap_key_aes_kw(
&self,
wrapping_key: &CryptoKey,
bytes: &[u8],
cx: JSContext,
handle: MutableHandleObject<'_>,
) -> Result<Vec<u8>, Error>
fn wrap_key_aes_kw( &self, wrapping_key: &CryptoKey, bytes: &[u8], cx: JSContext, handle: MutableHandleObject<'_>, ) -> Result<Vec<u8>, Error>
sourcefn unwrap_key_aes_kw(
&self,
wrapping_key: &CryptoKey,
bytes: &[u8],
cx: JSContext,
handle: MutableHandleObject<'_>,
) -> Result<Vec<u8>, Error>
fn unwrap_key_aes_kw( &self, wrapping_key: &CryptoKey, bytes: &[u8], cx: JSContext, handle: MutableHandleObject<'_>, ) -> Result<Vec<u8>, Error>
Trait Implementations§
source§impl DomObject for SubtleCrypto
impl DomObject for SubtleCrypto
source§impl DomObjectWrap for SubtleCrypto
impl DomObjectWrap for SubtleCrypto
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::SubtleCryptoBinding::SubtleCrypto_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::subtlecrypto::SubtleCrypto>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::subtlecrypto::SubtleCrypto>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::SubtleCryptoBinding::SubtleCrypto_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::subtlecrypto::SubtleCrypto>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::subtlecrypto::SubtleCrypto>>}
Function pointer to the general wrap function type
source§impl HasParent for SubtleCrypto
impl HasParent for SubtleCrypto
source§impl IDLInterface for SubtleCrypto
impl IDLInterface for SubtleCrypto
source§impl MallocSizeOf for SubtleCrypto
impl MallocSizeOf for SubtleCrypto
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for SubtleCrypto
impl MutDomObject for SubtleCrypto
source§impl PartialEq for SubtleCrypto
impl PartialEq for SubtleCrypto
source§impl SubtleCryptoMethods for SubtleCrypto
impl SubtleCryptoMethods for SubtleCrypto
source§fn Encrypt(
&self,
cx: JSContext,
algorithm: AlgorithmIdentifier,
key: &CryptoKey,
data: ArrayBufferViewOrArrayBuffer,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn Encrypt( &self, cx: JSContext, algorithm: AlgorithmIdentifier, key: &CryptoKey, data: ArrayBufferViewOrArrayBuffer, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn Decrypt(
&self,
cx: JSContext,
algorithm: AlgorithmIdentifier,
key: &CryptoKey,
data: ArrayBufferViewOrArrayBuffer,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn Decrypt( &self, cx: JSContext, algorithm: AlgorithmIdentifier, key: &CryptoKey, data: ArrayBufferViewOrArrayBuffer, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn Sign(
&self,
cx: SafeJSContext,
algorithm: AlgorithmIdentifier,
key: &CryptoKey,
data: ArrayBufferViewOrArrayBuffer,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn Sign( &self, cx: SafeJSContext, algorithm: AlgorithmIdentifier, key: &CryptoKey, data: ArrayBufferViewOrArrayBuffer, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn Verify(
&self,
cx: SafeJSContext,
algorithm: AlgorithmIdentifier,
key: &CryptoKey,
signature: ArrayBufferViewOrArrayBuffer,
data: ArrayBufferViewOrArrayBuffer,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn Verify( &self, cx: SafeJSContext, algorithm: AlgorithmIdentifier, key: &CryptoKey, signature: ArrayBufferViewOrArrayBuffer, data: ArrayBufferViewOrArrayBuffer, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn Digest(
&self,
cx: SafeJSContext,
algorithm: AlgorithmIdentifier,
data: ArrayBufferViewOrArrayBuffer,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn Digest( &self, cx: SafeJSContext, algorithm: AlgorithmIdentifier, data: ArrayBufferViewOrArrayBuffer, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn GenerateKey(
&self,
cx: JSContext,
algorithm: AlgorithmIdentifier,
extractable: bool,
key_usages: Vec<KeyUsage>,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn GenerateKey( &self, cx: JSContext, algorithm: AlgorithmIdentifier, extractable: bool, key_usages: Vec<KeyUsage>, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn DeriveKey(
&self,
cx: SafeJSContext,
algorithm: AlgorithmIdentifier,
base_key: &CryptoKey,
derived_key_type: AlgorithmIdentifier,
extractable: bool,
key_usages: Vec<KeyUsage>,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn DeriveKey( &self, cx: SafeJSContext, algorithm: AlgorithmIdentifier, base_key: &CryptoKey, derived_key_type: AlgorithmIdentifier, extractable: bool, key_usages: Vec<KeyUsage>, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn DeriveBits(
&self,
cx: SafeJSContext,
algorithm: AlgorithmIdentifier,
base_key: &CryptoKey,
length: Option<u32>,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn DeriveBits( &self, cx: SafeJSContext, algorithm: AlgorithmIdentifier, base_key: &CryptoKey, length: Option<u32>, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn ImportKey(
&self,
cx: JSContext,
format: KeyFormat,
key_data: ArrayBufferViewOrArrayBufferOrJsonWebKey,
algorithm: AlgorithmIdentifier,
extractable: bool,
key_usages: Vec<KeyUsage>,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn ImportKey( &self, cx: JSContext, format: KeyFormat, key_data: ArrayBufferViewOrArrayBufferOrJsonWebKey, algorithm: AlgorithmIdentifier, extractable: bool, key_usages: Vec<KeyUsage>, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn ExportKey(
&self,
format: KeyFormat,
key: &CryptoKey,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn ExportKey( &self, format: KeyFormat, key: &CryptoKey, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn WrapKey(
&self,
cx: JSContext,
format: KeyFormat,
key: &CryptoKey,
wrapping_key: &CryptoKey,
wrap_algorithm: AlgorithmIdentifier,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn WrapKey( &self, cx: JSContext, format: KeyFormat, key: &CryptoKey, wrapping_key: &CryptoKey, wrap_algorithm: AlgorithmIdentifier, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§fn UnwrapKey(
&self,
cx: JSContext,
format: KeyFormat,
wrapped_key: ArrayBufferViewOrArrayBuffer,
unwrapping_key: &CryptoKey,
unwrap_algorithm: AlgorithmIdentifier,
unwrapped_key_algorithm: AlgorithmIdentifier,
extractable: bool,
key_usages: Vec<KeyUsage>,
comp: InRealm<'_>,
can_gc: CanGc,
) -> Rc<Promise>
fn UnwrapKey( &self, cx: JSContext, format: KeyFormat, wrapped_key: ArrayBufferViewOrArrayBuffer, unwrapping_key: &CryptoKey, unwrap_algorithm: AlgorithmIdentifier, unwrapped_key_algorithm: AlgorithmIdentifier, extractable: bool, key_usages: Vec<KeyUsage>, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>
source§impl ToJSValConvertible for SubtleCrypto
impl ToJSValConvertible for SubtleCrypto
source§impl Traceable for SubtleCrypto
impl Traceable for SubtleCrypto
impl Eq for SubtleCrypto
Auto Trait Implementations§
impl !Freeze for SubtleCrypto
impl !RefUnwindSafe for SubtleCrypto
impl !Send for SubtleCrypto
impl !Sync for SubtleCrypto
impl Unpin for SubtleCrypto
impl UnwindSafe for SubtleCrypto
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert