From bc617aef13e54df0c77d229253a6a49d82b769f8 Mon Sep 17 00:00:00 2001 From: deatil <2217957370@qq.com> Date: Wed, 21 Feb 2024 18:22:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/ecdh.md | 4 ++-- docs/ed448.md | 4 ++-- docs/eddsa.md | 4 ++-- docs/sm2.md | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/ecdh.md b/docs/ecdh.md index e4e0c390..c718319b 100644 --- a/docs/ecdh.md +++ b/docs/ecdh.md @@ -33,8 +33,8 @@ Error() func main() { // 可用参数 [P521 | P384 | P256 | X25519] obj := ecdh.New(). - SetCurve("P256"). - GenerateKey() + SetCurve("P256"). + GenerateKey() // 私钥密码 // privatekey password diff --git a/docs/ed448.md b/docs/ed448.md index 1f76561c..b2df56ee 100644 --- a/docs/ed448.md +++ b/docs/ed448.md @@ -81,8 +81,8 @@ func main() { // privatekey password var psssword string = "" - // ctx 数据 - var ctx string = "" + // ctx 数据 + var ctx string = "" obj := ed448.New() diff --git a/docs/eddsa.md b/docs/eddsa.md index 8a81f5cf..3f145d79 100644 --- a/docs/eddsa.md +++ b/docs/eddsa.md @@ -81,8 +81,8 @@ func main() { // privatekey password var psssword string = "" - // ctx 数据 - var ctx string = "" + // ctx 数据 + var ctx string = "" obj := eddsa.New() diff --git a/docs/sm2.md b/docs/sm2.md index 7726763d..fc961424 100644 --- a/docs/sm2.md +++ b/docs/sm2.md @@ -86,8 +86,8 @@ func main() { // privatekey password var psssword string = "" - // 设置 UID 值 - var uid []byte = []byte("") + // 设置 UID 值 + var uid []byte = []byte("") obj := sm2.New() @@ -102,7 +102,7 @@ func main() { // FromPKCS1PrivateKeyWithPassword([]byte(priKeyPem), psssword). // FromPKCS8PrivateKey([]byte(priKeyPem)). // FromPKCS8PrivateKeyWithPassword([]byte(priKeyPem), psssword). - // WithUID(uid). + // WithUID(uid). Sign(). // SignASN1(). // SignBytes(). @@ -114,7 +114,7 @@ func main() { var res bool = obj. FromBase64String(sigBase64String). FromPublicKey([]byte(pubKeyPem)). - // WithUID(uid). + // WithUID(uid). Verify([]byte(data)). // VerifyASN1([]byte(data)). // VerifyBytes([]byte(data)). @@ -245,7 +245,7 @@ func main() { sm2Sign := sm2.New(). FromString(sm2data). FromPrivateKeyBytes(sm2keyBytes). - WithUID([]byte(sm2userid)). + WithUID([]byte(sm2userid)). SignBytes(). // SignASN1(). ToBase64String() @@ -256,7 +256,7 @@ func main() { FromBase64String(sm2signdata). FromPrivateKeyBytes(sm2keyBytes). MakePublicKey(). - WithUID([]byte(sm2userid)). + WithUID([]byte(sm2userid)). VerifyBytes([]byte(sm2data)). // VerifyASN1([]byte(sm2data)). ToVerify()