Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

V-hash

A hash library for vlang.

Env

  • vlang >= 0.5.2

Adding v-hash as a dependency

Add the dependency to your project:

v install deatil.hash

or

v install --git https://github.com/deatil/v-hash

The v-hash structure can be imported in your application with:

import deatil.hash

Get Starting

module main

import deatil.hash.md2

fn main() {
    mut d := md2.new()
    d.write("abc".bytes()) or { panic(err) }
    out := d.sum([])
    
    // output: da853b0d3f88d99b30283a69e6ded6bb
    println("output: ${out.hex()}")
}

Hash Functions

  • md2: deatil.hash.md2
  • md4: deatil.hash.md4
  • has160: deatil.hash.has160
  • tiger: deatil.hash.tiger
  • sm3: deatil.hash.sm3
  • esch: deatil.hash.esch

LICENSE

  • The library LICENSE is Apache2, using the library need keep the LICENSE.

Copyright

Releases

Contributors

Languages