Struct scrypt::ScryptParams
source · [−]pub struct ScryptParams { /* private fields */ }
Expand description
The Scrypt parameter values.
Implementations
sourceimpl ScryptParams
impl ScryptParams
sourcepub fn new(log_n: u8, r: u32, p: u32) -> Result<ScryptParams, InvalidParams>
pub fn new(log_n: u8, r: u32, p: u32) -> Result<ScryptParams, InvalidParams>
Create a new instance of ScryptParams.
Arguments
log_n
- The log2 of the Scrypt parameterN
r
- The Scrypt parameterr
p
- The Scrypt parameterp
Conditions
log_n
must be less than64
r
must be greater than0
and less than or equal to4294967295
p
must be greater than0
and less than4294967295
Recommended values sufficient for most use-cases
log_n = 15
(n = 32768
)r = 8
p = 1
Trait Implementations
sourceimpl Clone for ScryptParams
impl Clone for ScryptParams
sourcefn clone(&self) -> ScryptParams
fn clone(&self) -> ScryptParams
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for ScryptParams
Auto Trait Implementations
impl RefUnwindSafe for ScryptParams
impl Send for ScryptParams
impl Sync for ScryptParams
impl Unpin for ScryptParams
impl UnwindSafe for ScryptParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more