diff --git a/api/@ohos.security.huks.d.ts b/api/@ohos.security.huks.d.ts index 208e2899a5470597acb72c72eca3be0a441ebba7..72f6d74f0e1bd9e76b12b5da9dea239327053d2d 100644 --- a/api/@ohos.security.huks.d.ts +++ b/api/@ohos.security.huks.d.ts @@ -1044,8 +1044,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1054,7 +1052,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Core * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function exportKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback): void; @@ -1126,8 +1125,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1136,7 +1133,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function exportKeyItem(keyAlias: string, options: HuksOptions): Promise; @@ -1205,8 +1203,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1215,7 +1211,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Core * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getKeyItemProperties( keyAlias: string, @@ -1291,8 +1288,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1301,7 +1296,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getKeyItemProperties(keyAlias: string, options: HuksOptions): Promise; @@ -1345,8 +1341,6 @@ declare namespace huks { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1354,7 +1348,8 @@ declare namespace huks { * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Core - * @since 9 + * @since arkts{ '1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function isKeyItemExist(keyAlias: string, options: HuksOptions, callback: AsyncCallback): void; @@ -1371,8 +1366,6 @@ declare namespace huks { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1380,7 +1373,8 @@ declare namespace huks { * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension - * @since 9 + * @since arkts{ '1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function isKeyItemExist(keyAlias: string, options: HuksOptions): Promise; @@ -1398,8 +1392,6 @@ declare namespace huks { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1407,7 +1399,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Core * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function hasKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback): void; @@ -1445,7 +1438,7 @@ declare namespace huks { * * @param { string } keyAlias - Alias of the key to check. * @param { HuksOptions } options - Options for checking the key. For example, you can pass in HuksAuthStorageLevel to - * specify the security level of the key to check. HuksAuthStorageLevel can be left empty, which means the default + * specify the security level of the key to check. HuksAuthStorageLevel can be left empty, which means the default * value HUKS_AUTH_STORAGE_LEVEL_DE is used. * @returns { Promise } Promise used to return the result. If the key exists, true is returned. If the key * does not exist, false is returned. @@ -1454,8 +1447,6 @@ declare namespace huks { * 2. Incorrect parameter types. * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -1463,7 +1454,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function hasKeyItem(keyAlias: string, options: HuksOptions): Promise; @@ -1544,7 +1536,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Core * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function initSession(keyAlias: string, options: HuksOptions, callback: AsyncCallback): void; @@ -1597,7 +1590,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function initSession(keyAlias: string, options: HuksOptions): Promise; @@ -1665,7 +1659,7 @@ declare namespace huks { * Updates the key operation by segment. This API uses an asynchronous callback to return the result. * huks.initSession, huks.updateSession, and huks.finishSession must be used together. * - * @param { number } handle - Handle for the updateSession operation. + * @param { long } handle - Handle for the updateSession operation. * @param { HuksOptions } options - Parameter set used for the updateSession operation. * @param { AsyncCallback } callback - Callback used to return the updateSession operation result. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -1692,7 +1686,7 @@ declare namespace huks { * Updates the key operation by segment. This API uses an asynchronous callback to return the result. * huks.initSession, huks.updateSession, and huks.finishSession must be used together. * - * @param { number } handle - Handle for the updateSession operation. + * @param { long } handle - Handle for the updateSession operation. * @param { HuksOptions } options - Parameter set used for the updateSession operation. * @param { AsyncCallback } callback - Callback used to return the updateSession operation result. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -1714,7 +1708,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Core * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function updateSession(handle: number, options: HuksOptions, callback: AsyncCallback): void; @@ -1722,7 +1717,7 @@ declare namespace huks { * Updates the key operation by segment. This API uses an asynchronous callback to return the result. * huks.initSession, huks.updateSession, and huks.finishSession must be used together. * - * @param { number } handle - Handle for the updateSession operation. + * @param { long } handle - Handle for the updateSession operation. * @param { HuksOptions } options - Parameter set used for the updateSession operation. * @param { Uint8Array } token - Authentication token for refined key access control. * @param { AsyncCallback } callback - Callback used to return the updateSession operation result. @@ -1750,7 +1745,7 @@ declare namespace huks { * Updates the key operation by segment. This API uses an asynchronous callback to return the result. * huks.initSession, huks.updateSession, and huks.finishSession must be used together. * - * @param { number } handle - Handle for the updateSession operation. + * @param { long } handle - Handle for the updateSession operation. * @param { HuksOptions } options - Parameter set used for the updateSession operation. * @param { Uint8Array } token - Authentication token for refined key access control. * @param { AsyncCallback } callback - Callback used to return the updateSession operation result. @@ -1773,7 +1768,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function updateSession( handle: number, @@ -1786,7 +1782,7 @@ declare namespace huks { * Updates the key operation by segment. This API uses a promise to return the result. huks.initSession, * huks.updateSession, and huks.finishSession must be used together. * - * @param { number } handle - Handle for the updateSession operation. + * @param { long } handle - Handle for the updateSession operation. * @param { HuksOptions } options - Parameter set used for the updateSession operation. * @param { Uint8Array } token - Authentication token for refined key access control. If this parameter is left blank, * refined key access control is not performed. @@ -1815,7 +1811,7 @@ declare namespace huks { * Updates the key operation by segment. This API uses a promise to return the result. huks.initSession, * huks.updateSession, and huks.finishSession must be used together. * - * @param { number } handle - Handle for the updateSession operation. + * @param { long } handle - Handle for the updateSession operation. * @param { HuksOptions } options - Parameter set used for the updateSession operation. * @param { Uint8Array } token - Authentication token for refined key access control. If this parameter is left blank, * refined key access control is not performed. @@ -1839,7 +1835,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function updateSession(handle: number, options: HuksOptions, token?: Uint8Array): Promise; @@ -1937,6 +1934,8 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported + * @throws { BusinessError } 12000002 - algorithm param is missing + * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2024,6 +2023,8 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported + * @throws { BusinessError } 12000002 - algorithm param is missing + * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2119,6 +2120,8 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported + * @throws { BusinessError } 12000002 - algorithm param is missing + * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2258,8 +2261,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2267,7 +2268,8 @@ declare namespace huks { * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension - * @since 9 + * @since arkts{ '1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback): void; @@ -2317,8 +2319,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2326,7 +2326,8 @@ declare namespace huks { * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension - * @since 9 + * @since arkts{ '1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function attestKeyItem(keyAlias: string, options: HuksOptions): Promise; @@ -2346,8 +2347,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2373,8 +2372,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2383,7 +2380,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function anonAttestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback): void; @@ -2461,8 +2459,6 @@ declare namespace huks { * 3. Parameter verification failed. * @throws { BusinessError } 801 - api is not supported * @throws { BusinessError } 12000001 - algorithm mode is not supported - * @throws { BusinessError } 12000002 - algorithm param is missing - * @throws { BusinessError } 12000003 - algorithm param is invalid * @throws { BusinessError } 12000004 - operating file failed * @throws { BusinessError } 12000005 - IPC communication failed * @throws { BusinessError } 12000006 - error occurred in crypto engine @@ -2471,7 +2467,8 @@ declare namespace huks { * @throws { BusinessError } 12000014 - memory is insufficient * @syscap SystemCapability.Security.Huks.Extension * @atomicservice - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function anonAttestKeyItem(keyAlias: string, options: HuksOptions): Promise;