pub(crate) type HmacKeyAlgorithm = HmacKeyAlgorithm;
Aliased Type§
struct HmacKeyAlgorithm {
pub parent: KeyAlgorithm,
pub hash: KeyAlgorithm,
pub length: u32,
}
Fields§
§parent: KeyAlgorithm
§hash: KeyAlgorithm
§length: u32
Implementations
Source§impl HmacKeyAlgorithm
impl HmacKeyAlgorithm
pub fn new( cx: JSContext, val: Handle<'_, Value>, ) -> Result<ConversionResult<HmacKeyAlgorithm>, ()>
Source§impl HmacKeyAlgorithm
impl HmacKeyAlgorithm
pub unsafe fn to_jsobject( &self, cx: *mut JSContext, obj: MutableHandle<'_, *mut JSObject>, )
Trait Implementations
Source§impl AlgorithmFromLengthAndHash for HmacKeyAlgorithm
impl AlgorithmFromLengthAndHash for HmacKeyAlgorithm
fn from_length_and_hash( length: u32, hash: DigestAlgorithm, out: MutableHandleObject<'_>, cx: JSContext, )
Source§impl FromJSValConvertible for HmacKeyAlgorithm
impl FromJSValConvertible for HmacKeyAlgorithm
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<HmacKeyAlgorithm>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _option: (), ) -> Result<ConversionResult<HmacKeyAlgorithm>, ()>
Convert
val
to type Self
.
Optional configuration of type T
can be passed as the option
argument.
If it returns Err(())
, a JSAPI exception is pending.
If it returns Ok(Failure(reason))
, there is no pending JSAPI exception.