Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BLANK = sha256.Sum256([]byte(""))
View Source
var FALSE = sha256.Sum256([]byte("false"))
View Source
var NULL = sha256.Sum256([]byte("null"))
View Source
var TRUE = sha256.Sum256([]byte("true"))
Functions ¶
func CalculateHash ¶
Types ¶
type HashCalculator ¶
type HashCalculator struct {
// contains filtered or unexported fields
}
вариант со структурой, чтобы не пересоздавать мапу каждый раз при многократном использовании
func NewHashCalculator ¶
func NewHashCalculator(exclude []string) (calc HashCalculator)
func (*HashCalculator) CalculateHash ¶
func (h *HashCalculator) CalculateHash(in interface{}) [32]byte
func (*HashCalculator) CalculateJsonHash ¶
func (h *HashCalculator) CalculateJsonHash(in []byte) ([32]byte, error)
Click to show internal directories.
Click to hide internal directories.