Package hashdb provides a database for hex-based hashes.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
importer
server
.gitignore
LICENSE
README.md
datastore.go
datastore_test.go
docs.go
errors.go
hashdb.go
hashdb_test.go
hashmix.go
hashmix_test.go
request_response.go
request_response_test.go

README.md

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
  }