pub struct Params(/* private fields */);
Expand description
The scrypt parameters used for the encrypted data.
Implementations§
Source§impl Params
impl Params
Sourcepub fn new(ciphertext: &[u8]) -> Result<Params, JsError>
pub fn new(ciphertext: &[u8]) -> Result<Params, JsError>
Creates a new instance of the scrypt parameters from ciphertext
.
§Errors
Returns an error if any of the following are true:
ciphertext
is shorter than 128 bytes.- The magic number is invalid.
- The version number is the unrecognized scrypt version number.
- The scrypt parameters are invalid.
Trait Implementations§
Source§impl FromWasmAbi for Params
impl FromWasmAbi for Params
Source§impl IntoWasmAbi for Params
impl IntoWasmAbi for Params
Source§impl LongRefFromWasmAbi for Params
impl LongRefFromWasmAbi for Params
Source§impl OptionFromWasmAbi for Params
impl OptionFromWasmAbi for Params
Source§impl OptionIntoWasmAbi for Params
impl OptionIntoWasmAbi for Params
Source§impl RefFromWasmAbi for Params
impl RefFromWasmAbi for Params
Source§impl RefMutFromWasmAbi for Params
impl RefMutFromWasmAbi for Params
Source§impl TryFromJsValue for Params
impl TryFromJsValue for Params
Source§impl VectorFromWasmAbi for Params
impl VectorFromWasmAbi for Params
Source§impl VectorIntoWasmAbi for Params
impl VectorIntoWasmAbi for Params
impl Copy for Params
impl SupportsConstructor for Params
impl SupportsInstanceProperty for Params
impl SupportsStaticProperty for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.