package
Version:
v3.0.2
Opens a new window with list of versions in this module.
Published: Jul 26, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Hash hash implement
var msg string = "message"
var sm3 Context
sm3.Reset()
sm3.Append([]byte(msg))
hash := sm3.Final()
fmt.Printf("%x", hash)
Output:
1756ac517f85ffda751dcdebf3c89575272fc56904f9baad983ec44c36feac7b
Context is the SM3 context
NewContext create a Context
Append add new data for sm3 hash
Final calculate sm3 hash algorithm
Reset clear data and reset state
Source Files
¶
Click to show internal directories.
Click to hide internal directories.