https://github.com/mahdadghasemian/go-rabbitmq-hash
Rabbitmq password generator with GoLang
https://github.com/mahdadghasemian/go-rabbitmq-hash
Last synced: 3 months ago
JSON representation
Rabbitmq password generator with GoLang
- Host: GitHub
- URL: https://github.com/mahdadghasemian/go-rabbitmq-hash
- Owner: MahdadGhasemian
- License: mit
- Created: 2022-11-17T08:49:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-17T09:15:29.000Z (over 2 years ago)
- Last Synced: 2025-02-04T16:14:48.163Z (4 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github.com/MahdadGhasemian/go-rabbitmq-hash
## Usage
### Initialize your module
```
$ go mod init example.com/my-hash-demo
```### Get the go-rabbitmq-hash module
Note that you need to include the **v** in the version tag.
```
$ go get github.com/MahdadGhasemian/[email protected]
``````go
package mainimport (
"fmt"rabbitmqHash "github.com/MahdadGhasemian/go-rabbitmq-hash"
)func main() {
// random salt
fmt.Println(rabbitmqHash.Hash("passowrd", 0))
// salt = 1234
fmt.Println(rabbitmqHash.Hash("passowrd", 1234))
// salt = 0x908DC60A
fmt.Println(rabbitmqHash.Hash("test12", 0x908DC60A))
}
```## Testing
```
$ go test
```