Skip to content

Commit

Permalink
随机生成公私钥对,方法更新 (#1556)
Browse files Browse the repository at this point in the history
文档中旧的生成公私钥对的方法在新版本已经没有了,更新为新版本的公私钥对的方法。

Co-authored-by: jimmyshi <417711026@qq.com>
  • Loading branch information
bingowu830 and JimmyShi22 committed Oct 14, 2022
1 parent afc431c commit 0a03987
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 3.x/zh_CN/docs/develop/sdk/java_sdk/keytool.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Java SDK的`org.fisco.bcos.sdk.v3.crypto.CryptoSuite`提供了账户生成功能
// 创建非国密类型的CryptoSuite
CryptoSuite cryptoSuite = new CryptoSuite(CryptoType.ECDSA_TYPE);
// 随机生成非国密公私钥对
CryptoKeyPair cryptoKeyPair = cryptoSuite.createKeyPair();
CryptoKeyPair cryptoKeyPair = cryptoSuite.generateRandomKeyPair();
// 获取账户地址
String accountAddress = cryptoKeyPair.getAddress();
```
Expand All @@ -149,7 +149,7 @@ String accountAddress = cryptoKeyPair.getAddress();
// 创建国密类型的CryptoSuite
CryptoSuite cryptoSuite = new CryptoSuite(CryptoType.SM_TYPE);
// 随机生成国密公私钥对
CryptoKeyPair cryptoKeyPair = cryptoSuite.createKeyPair();
CryptoKeyPair cryptoKeyPair = cryptoSuite.generateRandomKeyPair();
// 获取账户地址
String accountAddress = cryptoKeyPair.getAddress();
```
Expand Down

0 comments on commit 0a03987

Please sign in to comment.