mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-27 12:46:18 +08:00
sm9: use correct method
This commit is contained in:
parent
d52750d7a8
commit
2eb1c508b8
@ -135,7 +135,7 @@ func ExampleEncryptPrivateKey_Decrypt() {
|
||||
}
|
||||
uid := []byte("Bob")
|
||||
cipherDer, _ := hex.DecodeString("307f020100034200042cb3e90b0977211597652f26ee4abbe275ccb18dd7f431876ab5d40cc2fc563d9417791c75bc8909336a4e6562450836cc863f51002e31ecf0c4aae8d98641070420638ca5bfb35d25cff7cbd684f3ed75f2d919da86a921a2e3e2e2f4cbcf583f240414b7e776811774722a8720752fb1355ce45dc3d0df")
|
||||
plaintext, err := userKey.Decrypt(uid, cipherDer, nil)
|
||||
plaintext, err := userKey.DecryptASN1(uid, cipherDer)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error from Decrypt: %s\n", err)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user