Skip to content

Commit 06630e7

Browse files
committed
rsa 单测
1 parent 452a36c commit 06630e7

File tree

2 files changed

+76
-63
lines changed

2 files changed

+76
-63
lines changed

_examples/rsa.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func main() {
4646
fmt.Printf("decrypt: %s\n", decrypt)
4747

4848
// Use the private key to sign msg.
49-
digest := hash.SHA256(msg, encoding.Hex)
49+
digest := hash.SHA256(msg, encoding.None)
5050

5151
sign, err := privateKey.SignPSS(digest, 0, encoding.Hex)
5252
if err != nil {
@@ -61,5 +61,5 @@ func main() {
6161
panic(err)
6262
}
6363

64-
fmt.Println("verify: %s\n", digest)
64+
fmt.Printf("verify: %s\n", msg)
6565
}

0 commit comments

Comments
 (0)