1# Security Subsystem Changelog
2
3## cl.security.1 ParamsSpec Attribute Name Change
4Changed **algoName** of the **ParamsSpec** structure to **algName**.
5
6**Change Impact**
7
8For the released JavaScript APIs that use **ParamsSpec** and its child classes **IvParamsSpec**, **GcmParamsSpec**, and **CcmParamsSpec** as parameters or return values, **algoName** must be changed to **algName**.
9The change must be made for all the applications that use these APIs. Otherwise, the compilation in the SDK of the new version cannot be successful.
10
11**Key API/Component Changes**
12
13API prototype before the change:
14
15 ```ts
16interface ParamsSpec {
17    /**
18     * Indicates the algorithm name. Should be set before initialization of a cipher object.
19     * @type { string }
20     * @syscap SystemCapability.Security.CryptoFramework
21     * @since 9
22     */
23    algoName : string;
24}
25 ```
26API prototype after the change:
27
28 ```ts
29interface ParamsSpec {
30    /**
31     * Indicates the algorithm name. Should be set before initialization of a cipher object.
32     * @type { string }
33     * @syscap SystemCapability.Security.CryptoFramework
34     * @since 9
35     */
36    algName : string;
37}
38 ```
39
40**Adaptation Guide**
41
42Change **algoName** to **algName** in **ParamsSpec** and its child classes **IvParamsSpec**, **GcmParamsSpec**, and **CcmParamsSpec**.
43 ```ts
44function genGcmParamsSpec() {
45  let arr = [0, 0, 0, 0 , 0, 0, 0, 0, 0, 0 , 0, 0]; // 12 bytes
46  let dataIv = new Uint8Array(arr);
47  let ivBlob = {data : dataIv};
48
49  arr = [0, 0, 0, 0 , 0, 0, 0, 0]; // 8 bytes
50  let dataAad = new Uint8Array(arr);
51  let aadBlob = {data : dataAad};
52
53  arr = [0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0]; // 16 bytes
54  let dataTag = new Uint8Array(arr);
55  let tagBlob = {data : dataTag};
56  let gcmParamsSpec = {iv : ivBlob, aad : aadBlob, authTag : tagBlob, algName : "GcmParamsSpec"};
57  return gcmParamsSpec;
58}
59 ```
60For details, see the APIs of **ParamsSpec** in [Crypto Framework](../../../application-dev/reference/apis/js-apis-cryptoFramework.md#paramsspec).
61
62## Change of cl.security.2 ECC Algorithm Parameter Name from ECC512 to ECC521
63
64**Change Impact**
65
66Behavior of released JavaScript APIs will be changed.
67The application needs to be adapted to obtain the correct result in the SDK of the new version.
68
69**Key API/Component Changes**
70The parameter passed in the APIs is changed from **ECC512** to **ECC521**. The related APIs remain unchanged. For details, see [Key Generation Specifications](../../../application-dev/security/cryptoFramework-overview.md#key-generation-specifications). The following APIs are involved:
71
72cryptoFramework.createAsyKeyGenerator
73
74cryptoFramework.createSign
75
76cryptoFramework.createVerify
77
78cryptoFramework.createKeyAgreement
79
80**Adaptation Guide**
81
82```js
83import cryptoFramework from "@ohos.security.cryptoFramework"
84
85let asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC521");
86```
87