Skip to content

A Rust Library For Nano's Proof of Work Consensus Algorithm That Uses Blake2B.

Notifications You must be signed in to change notification settings

AtropineTears/blake2b-pow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blake2B-PoW

A Rust Library That Performs Proof of Work (Consensus Algorithm) using Blake2B. Useful for Blockchain-related projects.

Usage

extern crate blake2b_pow;
use blake2b_pow::{mine,verify_nonce};

fn main() {
    let correct_nonce = mine(&[0x3Eu8;32], 0xffffffc000000000);

    let _is_valid = verify_nonce(&[0x3Eu8;32], 0xffffffc000000000, correct_nonce);
}