1e41f4b71Sopenharmony_ci# Security Subsystem Changelog 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci## cl.security.1 ParamsSpec Attribute Name Change 4e41f4b71Sopenharmony_ciChanged **algoName** of the **ParamsSpec** structure to **algName**. 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ci**Change Impact** 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ciFor 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**. 9e41f4b71Sopenharmony_ciThe 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. 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci**Key API/Component Changes** 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ciAPI prototype before the change: 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci ```ts 16e41f4b71Sopenharmony_ciinterface ParamsSpec { 17e41f4b71Sopenharmony_ci /** 18e41f4b71Sopenharmony_ci * Indicates the algorithm name. Should be set before initialization of a cipher object. 19e41f4b71Sopenharmony_ci * @type { string } 20e41f4b71Sopenharmony_ci * @syscap SystemCapability.Security.CryptoFramework 21e41f4b71Sopenharmony_ci * @since 9 22e41f4b71Sopenharmony_ci */ 23e41f4b71Sopenharmony_ci algoName : string; 24e41f4b71Sopenharmony_ci} 25e41f4b71Sopenharmony_ci ``` 26e41f4b71Sopenharmony_ciAPI prototype after the change: 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci ```ts 29e41f4b71Sopenharmony_ciinterface ParamsSpec { 30e41f4b71Sopenharmony_ci /** 31e41f4b71Sopenharmony_ci * Indicates the algorithm name. Should be set before initialization of a cipher object. 32e41f4b71Sopenharmony_ci * @type { string } 33e41f4b71Sopenharmony_ci * @syscap SystemCapability.Security.CryptoFramework 34e41f4b71Sopenharmony_ci * @since 9 35e41f4b71Sopenharmony_ci */ 36e41f4b71Sopenharmony_ci algName : string; 37e41f4b71Sopenharmony_ci} 38e41f4b71Sopenharmony_ci ``` 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci**Adaptation Guide** 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ciChange **algoName** to **algName** in **ParamsSpec** and its child classes **IvParamsSpec**, **GcmParamsSpec**, and **CcmParamsSpec**. 43e41f4b71Sopenharmony_ci ```ts 44e41f4b71Sopenharmony_cifunction genGcmParamsSpec() { 45e41f4b71Sopenharmony_ci let arr = [0, 0, 0, 0 , 0, 0, 0, 0, 0, 0 , 0, 0]; // 12 bytes 46e41f4b71Sopenharmony_ci let dataIv = new Uint8Array(arr); 47e41f4b71Sopenharmony_ci let ivBlob = {data : dataIv}; 48e41f4b71Sopenharmony_ci 49e41f4b71Sopenharmony_ci arr = [0, 0, 0, 0 , 0, 0, 0, 0]; // 8 bytes 50e41f4b71Sopenharmony_ci let dataAad = new Uint8Array(arr); 51e41f4b71Sopenharmony_ci let aadBlob = {data : dataAad}; 52e41f4b71Sopenharmony_ci 53e41f4b71Sopenharmony_ci arr = [0, 0, 0, 0 , 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0]; // 16 bytes 54e41f4b71Sopenharmony_ci let dataTag = new Uint8Array(arr); 55e41f4b71Sopenharmony_ci let tagBlob = {data : dataTag}; 56e41f4b71Sopenharmony_ci let gcmParamsSpec = {iv : ivBlob, aad : aadBlob, authTag : tagBlob, algName : "GcmParamsSpec"}; 57e41f4b71Sopenharmony_ci return gcmParamsSpec; 58e41f4b71Sopenharmony_ci} 59e41f4b71Sopenharmony_ci ``` 60e41f4b71Sopenharmony_ciFor details, see the APIs of **ParamsSpec** in [Crypto Framework](../../../application-dev/reference/apis/js-apis-cryptoFramework.md#paramsspec). 61e41f4b71Sopenharmony_ci 62e41f4b71Sopenharmony_ci## Change of cl.security.2 ECC Algorithm Parameter Name from ECC512 to ECC521 63e41f4b71Sopenharmony_ci 64e41f4b71Sopenharmony_ci**Change Impact** 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_ciBehavior of released JavaScript APIs will be changed. 67e41f4b71Sopenharmony_ciThe application needs to be adapted to obtain the correct result in the SDK of the new version. 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ci**Key API/Component Changes** 70e41f4b71Sopenharmony_ciThe 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: 71e41f4b71Sopenharmony_ci 72e41f4b71Sopenharmony_cicryptoFramework.createAsyKeyGenerator 73e41f4b71Sopenharmony_ci 74e41f4b71Sopenharmony_cicryptoFramework.createSign 75e41f4b71Sopenharmony_ci 76e41f4b71Sopenharmony_cicryptoFramework.createVerify 77e41f4b71Sopenharmony_ci 78e41f4b71Sopenharmony_cicryptoFramework.createKeyAgreement 79e41f4b71Sopenharmony_ci 80e41f4b71Sopenharmony_ci**Adaptation Guide** 81e41f4b71Sopenharmony_ci 82e41f4b71Sopenharmony_ci```js 83e41f4b71Sopenharmony_ciimport cryptoFramework from "@ohos.security.cryptoFramework" 84e41f4b71Sopenharmony_ci 85e41f4b71Sopenharmony_cilet asyKeyGenerator = cryptoFramework.createAsyKeyGenerator("ECC521"); 86e41f4b71Sopenharmony_ci``` 87