Struct mostinefficientsha::linopt::Linopt
[−]
[src]
pub struct Linopt { // some fields omitted }
Simple optimizer that tries to use the fuzzy Sha256 implementation to try to optimize to a target hash using a very simple linerarization algorithm.
Methods
impl Linopt
[src]
fn new(len_input_bytes: usize, target_hash: &str) -> Linopt
Uses len_input_bytes
as the length of the input to the sha256 hash algorithm.
target_hash
is the hash it tries to optimize to.
fn init(&self)
Inits all input bits to 0.5.
fn optimize(&self, rounds: usize)
Run optimization for rounds
rounds.
fn eval_to_u32(&self) -> ArrayVec<[u32; 8]>
Evaluate sha algorithm to u32s.
fn hex(&self) -> String
Evaluate sha algorithm to ascii representation.