rabbitmqHash

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 4 Imported by: 0

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/go-rabbitmq-hash@v0.1.0
package main

import (
    "fmt"

    "github.com/MahdadGhasemian/go-rabbitmq-hash"
)

func main() {
    // random salt
    fmt.Println(gorabbitmqhash.Hash("passowrd",0))
    // salt = 1234
    fmt.Println(gorabbitmqhash.Hash("passowrd",uint32(1234)))
}

Testing

$ go test

Tagging

$ git tag v0.1.0
$ git push origin --tags

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(password string, salt uint32) string

Return a new sha256 password according to rabbitmq requirements

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL