Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

hashdb

Package hashdb provides a database for hex-based hashes.

Sample

HashDatabase

  // Create a new database in memory.
  db, err := OpenDatabase(":memory:", md5.New(), 10)
  if err != nil {
      return err
  }
  
  // Add new entry
  err = db.Put("MT1992")
  if err != nil {
      return err
  }
  
  // Get entry
  password, err := db.GetExact("5f87e0f786e60b554ec522ce85ddc930")
  if err != nil {
      return err
  }

HashMix

  // Create a new hash-mix in memory.
  mix, err := OpenMix(":memory:", 1)
  if err != nil {
      return err
  }
  
  // Add new entry
  err = mix.Put("MT1992")
  if err != nil {
      return err
  }
  
  // Get entry
  passMap, err := mix.GetMD5("5f87e0f786e60b554ec522ce85ddc930") // or mix.GetMD5("5f87e0f")
  if err != nil {
      return err
  }

About

Package hashdb provides a database for hex-based hashes.

Resources

License

Releases

No releases published

Packages

No packages published

Languages