hstring

package
v0.0.0-...-bb29180 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crc32

func Crc32(str string) uint32

Crc32 crc32

Example
s := "hello"
ret := Crc32(s)
fmt.Println(ret)
Output:

907060870

func Md5By16

func Md5By16(s string) string

Md5By16 16位md5

Example

16位 md5

s := "hello"
ret := Md5By16(s)
fmt.Println(ret)
Output:

bc4b2a76b9719d91

func Md5By32

func Md5By32(s string) string

Md5By32 32位md5

Example

32位md5

s := "hello"
ret := Md5By32(s)
fmt.Println(ret)
Output:

5d41402abc4b2a76b9719d911017c592

func Sha1

func Sha1(str string) string

Sha1 sha1

Example

sha1

s := "hello"
ret := Sha1(s)
fmt.Println(ret)
Output:

aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d

func Sha256

func Sha256(str string) string

Sha256 SHA256

Example
s := "hello"
ret := Sha256(s)
fmt.Println(ret)
Output:

2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

func Sha512

func Sha512(str string) string

Sha512 SHA512

Example
s := "hello"
ret := Sha512(s)
fmt.Println(ret)
Output:

9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043

Types

This section is empty.

Jump to

Keyboard shortcuts

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