From 742bc6ce9d8bf00f2031ee8b19aaf31228f4e799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=95=B8=E5=A4=A9?= Date: Mon, 12 Jun 2023 07:48:43 +0000 Subject: [PATCH] update zh-cn/application-dev/security/cryptoFramework-guidelines.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 胡啸天 --- zh-cn/application-dev/security/cryptoFramework-guidelines.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zh-cn/application-dev/security/cryptoFramework-guidelines.md b/zh-cn/application-dev/security/cryptoFramework-guidelines.md index 50c7abdba9..72b58d10a1 100644 --- a/zh-cn/application-dev/security/cryptoFramework-guidelines.md +++ b/zh-cn/application-dev/security/cryptoFramework-guidelines.md @@ -140,6 +140,8 @@ function convertAsyKey() { 2. 调用convertKey方法,传入公钥二进制和私钥二进制(二者非必选项,可只传入其中一个),转换为KeyPair对象。 ```js +import cryptoFramework from '@ohos.security.cryptoFramework'; + function convertEccAsyKey() { let pubKeyArray = new Uint8Array([48,89,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,3,66,0,4,83,96,142,9,86,214,126,106,247,233,92,125,4,128,138,105,246,162,215,71,81,58,202,121,26,105,211,55,130,45,236,143,55,16,248,75,167,160,167,106,2,152,243,44,68,66,0,167,99,92,235,215,159,239,28,106,124,171,34,145,124,174,57,92]); let priKeyArray = new Uint8Array([48,49,2,1,1,4,32,115,56,137,35,207,0,60,191,90,61,136,105,210,16,27,4,171,57,10,61,123,40,189,28,34,207,236,22,45,223,10,189,160,10,6,8,42,134,72,206,61,3,1,7]); -- GitLab