14 lines
283 B
Go
14 lines
283 B
Go
package growthreport
|
|
|
|
import (
|
|
"crypto/sha256"
|
|
"encoding/hex"
|
|
"fmt"
|
|
)
|
|
|
|
func RequestHash(merchantID int64, terminalID string, refresh bool) string {
|
|
sum := sha256.Sum256([]byte(fmt.Sprintf("%d\x00%s\x00%t", merchantID, terminalID, refresh)))
|
|
return hex.EncodeToString(sum[:])
|
|
}
|
|
|