Add SM2 ZID support

This commit is contained in:
Zhi Guan
2018-08-07 20:25:04 +08:00
parent 028d209985
commit 838f4effbe
2 changed files with 32 additions and 0 deletions

View File

@@ -196,7 +196,9 @@ func main() {
fmt.Println(sm2pkpem_)
/* SM2 sign/verification */
sm2zid, _ := sm2pk.ComputeSM2IDDigest("1234567812345678")
sm3ctx.Reset()
sm3ctx.Update(sm2zid)
sm3ctx.Update([]byte("message"))
tbs, _ := sm3ctx.Final()