You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
219 B
Go
16 lines
219 B
Go
8 months ago
|
package starcrypto
|
||
|
|
||
|
import (
|
||
|
"b612.me/starcrypto/sm3"
|
||
|
)
|
||
|
|
||
|
func SM3(bstr []byte) []byte {
|
||
|
sm3sum := sm3.New()
|
||
|
sm3sum.Write(bstr)
|
||
|
return sm3sum.Sum(nil)
|
||
|
}
|
||
|
|
||
|
func SM3Str(bstr []byte) string {
|
||
|
return String(SM3(bstr))
|
||
|
}
|