Struct harsh::HarshBuilder
[−]
[src]
pub struct HarshBuilder { /* fields omitted */ }
Factory used to create a new Harsh
instance.
Note that this factory will be consumed upon initialization.
Methods
impl HarshBuilder
[src]
fn new() -> HarshBuilder
Creates a new HarshBuilder
instance.
fn salt<T: Into<Vec<u8>>>(self, salt: T) -> HarshBuilder
Provides a salt.
Note that this salt will be converted into a [u8]
before use, meaning
that multi-byte utf8 character values should be avoided.
fn alphabet<T: Into<Vec<u8>>>(self, alphabet: T) -> HarshBuilder
Provides an alphabet.
Note that this alphabet will be converted into a [u8]
before use, meaning
that multi-byte utf8 character values should be avoided.
fn separators<T: Into<Vec<u8>>>(self, separators: T) -> HarshBuilder
Provides a set of separators.
Note that these separators will be converted into a [u8]
before use,
meaning that multi-byte utf8 character values should be avoided.
fn length(self, hash_length: usize) -> HarshBuilder
Provides a minimum hash length.
Keep in mind that hashes produced may be longer than this length.
fn init(self) -> Result<Harsh>
Initializes a new Harsh
based on the HarshBuilder
.
This method will consume the HarshBuilder
.
Trait Implementations
impl Debug for HarshBuilder
[src]
impl Default for HarshBuilder
[src]
fn default() -> HarshBuilder
Returns the "default value" for a type. Read more