Documentation
¶
Index ¶
- Variables
- func LeftCRCPadding(text string, size int) string
- func MD5_16(s string) string
- func RegisterHmacHash(h HmacHash, f func() hash.Hash)
- type DataName
- type DataSet
- func (this *DataSet[N, M]) Add(name N, data func() M) *DataSet[N, M]
- func (this *DataSet[N, M]) All() map[N]func() M
- func (this *DataSet[N, M]) Clean()
- func (this *DataSet[N, M]) Get(name N) func() M
- func (this *DataSet[N, M]) Has(name N) bool
- func (this *DataSet[N, M]) Len() int
- func (this *DataSet[N, M]) Names() []N
- func (this *DataSet[N, M]) Remove(name N) *DataSet[N, M]
- type Hash
- func (this Hash) Adler32() Hash
- func (this Hash) Base64Decode(s string) ([]byte, error)
- func (this Hash) Base64Encode(src []byte) string
- func (this Hash) Blake2b_256() Hash
- func (this Hash) Blake2b_384() Hash
- func (this Hash) Blake2b_512() Hash
- func (this Hash) Blake2s_128() Hash
- func (this Hash) Blake2s_256() Hash
- func (this Hash) BlockSize() int
- func (this Hash) CRC16_Modbus() Hash
- func (this Hash) CRC16_X25() Hash
- func (this Hash) CRC32_Castagnoli() Hash
- func (this Hash) CRC32_IEEE() Hash
- func (this Hash) CRC32_Koopman() Hash
- func (this Hash) CRC64_ECMA() Hash
- func (this Hash) CRC64_ISO() Hash
- func (this Hash) CShake128(N, S []byte, num int) Hash
- func (this Hash) CShake256(N, S []byte, num int) Hash
- func (this Hash) Checksum(h hash.Hash) Hash
- func (this Hash) Fnv128() Hash
- func (this Hash) Fnv128a() Hash
- func (this Hash) Fnv32() Hash
- func (this Hash) Fnv32a() Hash
- func (this Hash) Fnv64() Hash
- func (this Hash) Fnv64a() Hash
- func (this Hash) FromBase64String(data string) Hash
- func (this Hash) FromBytes(data []byte) Hash
- func (this Hash) FromHexString(data string) Hash
- func (this Hash) FromReader(reader io.Reader) Hash
- func (this Hash) FromString(data string) Hash
- func (this Hash) FuncHash(f func([]byte) ([]byte, error)) Hash
- func (this Hash) Hash() hash.Hash
- func (this Hash) HexDecode(s string) ([]byte, error)
- func (this Hash) HexEncode(src []byte) string
- func (this Hash) Hmac(h func() hash.Hash, secret []byte) Hash
- func (this Hash) Keccak256() Hash
- func (this Hash) Keccak512() Hash
- func (this Hash) MD2() Hash
- func (this Hash) MD4() Hash
- func (this Hash) MD5() Hash
- func (this Hash) MD5SHA1() Hash
- func (this Hash) Maphash() Hash
- func (this Hash) Murmur128() Hash
- func (this Hash) Murmur128WithSeed(seed uint32) Hash
- func (this Hash) Murmur32() Hash
- func (this Hash) Murmur32WithSeed(seed uint32) Hash
- func (this Hash) Murmur64() Hash
- func (this Hash) Murmur64WithSeed(seed uint32) Hash
- func (this Hash) NewAdler32() Hash
- func (this Hash) NewBlake2b_256(key []byte) Hash
- func (this Hash) NewBlake2b_384(key []byte) Hash
- func (this Hash) NewBlake2b_512(key []byte) Hash
- func (this Hash) NewBlake2s_128(key []byte) Hash
- func (this Hash) NewBlake2s_256(key []byte) Hash
- func (this Hash) NewBy(name string, cfg ...map[string]any) Hash
- func (this Hash) NewCRC32_Castagnoli() Hash
- func (this Hash) NewCRC32_IEEE() Hash
- func (this Hash) NewCRC32_Koopman() Hash
- func (this Hash) NewCRC64_ECMA() Hash
- func (this Hash) NewCRC64_ISO() Hash
- func (this Hash) NewFnv128() Hash
- func (this Hash) NewFnv128a() Hash
- func (this Hash) NewFnv32() Hash
- func (this Hash) NewFnv32a() Hash
- func (this Hash) NewFnv64() Hash
- func (this Hash) NewFnv64a() Hash
- func (this Hash) NewHash(h hash.Hash) Hash
- func (this Hash) NewHmac(h func() hash.Hash, secret []byte) Hash
- func (this Hash) NewKeccak256() Hash
- func (this Hash) NewKeccak512() Hash
- func (this Hash) NewMD2() Hash
- func (this Hash) NewMD4() Hash
- func (this Hash) NewMD5() Hash
- func (this Hash) NewMaphash() Hash
- func (this Hash) NewMurmur128() Hash
- func (this Hash) NewMurmur128WithSeed(seed uint32) Hash
- func (this Hash) NewMurmur32() Hash
- func (this Hash) NewMurmur32WithSeed(seed uint32) Hash
- func (this Hash) NewMurmur64() Hash
- func (this Hash) NewMurmur64WithSeed(seed uint32) Hash
- func (this Hash) NewRipemd160() Hash
- func (this Hash) NewSHA1() Hash
- func (this Hash) NewSHA224() Hash
- func (this Hash) NewSHA256() Hash
- func (this Hash) NewSHA384() Hash
- func (this Hash) NewSHA3_224() Hash
- func (this Hash) NewSHA3_256() Hash
- func (this Hash) NewSHA3_384() Hash
- func (this Hash) NewSHA3_512() Hash
- func (this Hash) NewSHA512() Hash
- func (this Hash) NewSHA512_224() Hash
- func (this Hash) NewSHA512_256() Hash
- func (this Hash) NewSM3() Hash
- func (this Hash) Reset() Hash
- func (this Hash) Ripemd160() Hash
- func (this Hash) SHA1() Hash
- func (this Hash) SHA224() Hash
- func (this Hash) SHA256() Hash
- func (this Hash) SHA384() Hash
- func (this Hash) SHA3_224() Hash
- func (this Hash) SHA3_256() Hash
- func (this Hash) SHA3_384() Hash
- func (this Hash) SHA3_512() Hash
- func (this Hash) SHA512() Hash
- func (this Hash) SHA512_224() Hash
- func (this Hash) SHA512_256() Hash
- func (this Hash) SM3() Hash
- func (this Hash) Shake128(num int) Hash
- func (this Hash) Shake256(num int) Hash
- func (this Hash) Size() int
- func (this Hash) String() string
- func (this Hash) Sum(in []byte) Hash
- func (this Hash) Sum32() uint32
- func (this Hash) Sum64() uint64
- func (this Hash) SumBy(name string, in []byte, cfg ...map[string]any) Hash
- func (this Hash) ToBase64String() string
- func (this Hash) ToBytes() []byte
- func (this Hash) ToHexString() string
- func (this Hash) ToReader() io.Reader
- func (this Hash) ToString() string
- func (this Hash) Write(p []byte) Hash
- func (this Hash) WriteString(s string) Hash
- type HmacHash
- type IHash
Constants ¶
This section is empty.
Variables ¶
var UseHash = NewDataSet[string, IHash]()
使用
Functions ¶
func LeftCRCPadding ¶ added in v1.0.2005
CRC 左侧补码 0
func RegisterHmacHash ¶ added in v1.0.2003
Types ¶
type DataSet ¶ added in v1.0.2005
*
- 数据设置 *
- @create 2023-3-31
- @author deatil
type Hash ¶
type Hash struct { // 错误 Error error // contains filtered or unexported fields }
*
- hash *
- @create 2022-3-27
- @author deatil
func (Hash) CRC32_Castagnoli ¶ added in v1.0.2002
CRC32Castagnoli 哈希值
func (Hash) CRC32_Koopman ¶ added in v1.0.2002
CRC32Koopman 哈希值
func (Hash) FromReader ¶ added in v1.0.2002
FromReader
func (Hash) Hmac ¶ added in v1.0.2003
Hmac HMAC (Hash-based Message Authentication Code) 常用于接口签名验证 支持的算法有: md5、sha1、sha256、sha512、adler32、crc32、crc32b、crc32c、 fnv132、fnv164、fnv1a32、fnv1a64、 gost、gost-crypto、haval128,3、haval128,4、haval128,5、 haval160,3、haval160,4、haval160,5、haval192,3、haval192,4、 haval192,5、haval224,3、haval224,4、haval224,5、haval256,3、 haval256,4、haval256,5、joaat、md2、md4、 ripemd128、ripemd160、ripemd256、ripemd320、 sha224、sha3-224、sha3-256、sha3-384、sha3-512、 sha384、sha512/224、sha512/256、 snefru、snefru256、tiger128,3、tiger128,4、tiger160,3、 tiger160,4、tiger192,3、tiger192,4、whirlpool
func (Hash) Murmur128WithSeed ¶ added in v1.0.2002
murmur128
func (Hash) Murmur32WithSeed ¶ added in v1.0.2002
murmur32
func (Hash) Murmur64WithSeed ¶ added in v1.0.2002
murmur64
func (Hash) NewBlake2b_256 ¶ added in v1.0.2002
NewBlake2b_256
func (Hash) NewBlake2b_384 ¶ added in v1.0.2002
NewBlake2b_384
func (Hash) NewBlake2b_512 ¶ added in v1.0.2002
NewBlake2b_512
func (Hash) NewBlake2s_128 ¶ added in v1.0.2002
NewBlake2s_128
func (Hash) NewBlake2s_256 ¶ added in v1.0.2002
NewBlake2s_256
func (Hash) NewCRC32_Castagnoli ¶ added in v1.0.2002
NewCRC32_Castagnoli
func (Hash) NewCRC32_Koopman ¶ added in v1.0.2002
NewCRC32_Koopman
func (Hash) NewMurmur128WithSeed ¶ added in v1.0.2002
NewMurmur128WithSeed
func (Hash) NewMurmur32WithSeed ¶ added in v1.0.2002
NewMurmur32WithSeed
func (Hash) NewMurmur64WithSeed ¶ added in v1.0.2002
NewMurmur64WithSeed
func (Hash) WriteString ¶ added in v1.0.2002
WriteString