Skip to content

Commit

Permalink
大规模重构,优化代码使用
Browse files Browse the repository at this point in the history
  • Loading branch information
FishGoddess committed May 21, 2024
1 parent 10d2795 commit 675949b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions _examples/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ func main() {

fmt.Printf("Decrypted: %s\n", decrypted)

msg = hash.SHA256(msg)
if err != nil {
panic(err)
}

// Use private key to sign msg.
msg = hash.SHA256(msg)
signed, err := privateKey.SignPKCS1v15(msg)
if err != nil {
panic(err)
Expand Down

0 comments on commit 675949b

Please sign in to comment.