Documentation ¶
Overview ¶
Package md5 implements the MD5 hash algorithm as defined in RFC 1321.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Digest ¶
Digest calculates the MD5 digest and returns the resulting slice.
Example ¶
package main import ( "fmt" "gopkg.in/goyy/goyy.v0/util/crypto/md5" ) func main() { dst, _ := md5.Digest([]byte("goyy")) fmt.Println(fmt.Sprintf("%x", dst)) }
Output: db9e2a3e99dbace8332b3042a6beb793
func DigestHex ¶
DigestHex calculates the MD5 digest and returns the resulting hex string.
Example ¶
package main import ( "fmt" "gopkg.in/goyy/goyy.v0/util/crypto/md5" ) func main() { dst, _ := md5.DigestHex("goyy") fmt.Println(dst) }
Output: db9e2a3e99dbace8332b3042a6beb793
func DigestSum ¶
DigestSum calculates the MD5 digest to sum and returns the resulting slice.
Example ¶
package main import ( "fmt" "gopkg.in/goyy/goyy.v0/util/crypto/md5" ) func main() { dst, _ := md5.DigestSum([]byte("goyy"), []byte("goyy:")) fmt.Println(fmt.Sprintf("%x", dst)) }
Output: 676f79793adb9e2a3e99dbace8332b3042a6beb793
func DigestSumHex ¶
DigestSumHex calculates the MD5 digest to sum and returns the resulting hex string.
Example ¶
package main import ( "fmt" "gopkg.in/goyy/goyy.v0/util/crypto/md5" ) func main() { dst, _ := md5.DigestSumHex("goyy", "goyy:") fmt.Println(dst) }
Output: 676f79793adb9e2a3e99dbace8332b3042a6beb793
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.