Skip to content

scanpatch/gohasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use as web server

  1. Build the app

    go build -o ./build/gohasher ./cmd/main.go
  2. Run local server

    ./build/gohasher

    Run server on certain port:

    ./gohasher -port=9090

    * Default port is 8080

Api

Get hashed string:

http://localhost:8080/get-hash/?data=...&method=...

Where:

  • data - String for hashing
  • method - Hash method

Get available hash methods:

http://localhost:8080/hash-methods-list/


If the request is successful, response will be in json format:

{"hash":-8082402883035101391}

If the request is not successful, response will be in json format with error message:

{"error":"unknown hash method"}

{"error":"url param 'data' is missing"}

Use as package

  1. Import package:

     import "github.com/R-Romanov/gohasher/pkg/hasher"
    
  2. Call hashing function:

     h, err := hasher.Hash("example.com")
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages