pub trait HostKwKey: Send {
// Required methods
fn algorithm_name(&mut self, self_: Resource<KwKey>) -> Result<String>;
fn algorithm_length(&mut self, self_: Resource<KwKey>) -> Result<u32>;
fn extractable(&mut self, self_: Resource<KwKey>) -> Result<bool>;
fn can_wrap(&mut self, self_: Resource<KwKey>) -> Result<bool>;
fn can_unwrap(&mut self, self_: Resource<KwKey>) -> Result<bool>;
}Required Methods§
Sourcefn algorithm_name(&mut self, self_: Resource<KwKey>) -> Result<String>
fn algorithm_name(&mut self, self_: Resource<KwKey>) -> Result<String>
The registry name of the algorithm family this key is bound
to, e.g. "AES-KW" (WebCrypto’s KeyAlgorithm.name).
Parameters are separate getters, as for
mac-key.algorithm-name.
Sourcefn algorithm_length(&mut self, self_: Resource<KwKey>) -> Result<u32>
fn algorithm_length(&mut self, self_: Resource<KwKey>) -> Result<u32>
The key length in bits, e.g. 256 (WebCrypto’s
AesKeyAlgorithm.length).
Sourcefn extractable(&mut self, self_: Resource<KwKey>) -> Result<bool>
fn extractable(&mut self, self_: Resource<KwKey>) -> Result<bool>
Whether the key material may be exported.
Sourcefn can_wrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
fn can_wrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
Whether this key permits wrap. A refused operation fails
error.not-permitted.
Sourcefn can_unwrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
fn can_unwrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
Whether this key permits unwrap. See can-wrap.
Implementations on Foreign Types§
Source§impl<_T: HostKwKey + ?Sized + Send> HostKwKey for &mut _T
impl<_T: HostKwKey + ?Sized + Send> HostKwKey for &mut _T
Source§fn algorithm_name(&mut self, self_: Resource<KwKey>) -> Result<String>
fn algorithm_name(&mut self, self_: Resource<KwKey>) -> Result<String>
The registry name of the algorithm family this key is bound
to, e.g. "AES-KW" (WebCrypto’s KeyAlgorithm.name).
Parameters are separate getters, as for
mac-key.algorithm-name.
Source§fn algorithm_length(&mut self, self_: Resource<KwKey>) -> Result<u32>
fn algorithm_length(&mut self, self_: Resource<KwKey>) -> Result<u32>
The key length in bits, e.g. 256 (WebCrypto’s
AesKeyAlgorithm.length).
Source§fn extractable(&mut self, self_: Resource<KwKey>) -> Result<bool>
fn extractable(&mut self, self_: Resource<KwKey>) -> Result<bool>
Whether the key material may be exported.
Source§fn can_wrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
fn can_wrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
Whether this key permits wrap. A refused operation fails
error.not-permitted.
Source§fn can_unwrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
fn can_unwrap(&mut self, self_: Resource<KwKey>) -> Result<bool>
Whether this key permits unwrap. See can-wrap.