1# JS API Changes of the Security Subsystem 2 3The table below lists the APIs changes of the security subsystem in OpenHarmony 3.2 Beta2 over OpenHarmony 3.2 Beta1. 4 5## API Changes 6 7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| 8|---|---|---|---| 9| ohos.privacyManager | UsedRecordDetail | accessDuration: number; | Added| 10| ohos.privacyManager | UsedRecordDetail | timestamp: number; | Added| 11| ohos.privacyManager | UsedRecordDetail | status: number; | Added| 12| ohos.privacyManager | PermissionUsedRecord | rejectRecords: Array\<UsedRecordDetail>; | Added| 13| ohos.privacyManager | PermissionUsedRecord | accessRecords: Array\<UsedRecordDetail>; | Added| 14| ohos.privacyManager | PermissionUsedRecord | lastAccessDuration: number; | Added| 15| ohos.privacyManager | PermissionUsedRecord | lastRejectTime: number; | Added| 16| ohos.privacyManager | PermissionUsedRecord | lastAccessTime: number; | Added| 17| ohos.privacyManager | PermissionUsedRecord | rejectCount: number; | Added| 18| ohos.privacyManager | PermissionUsedRecord | accessCount: number; | Added| 19| ohos.privacyManager | PermissionUsedRecord | permissionName: string; | Added| 20| ohos.privacyManager | BundleUsedRecord | permissionRecords: Array\<PermissionUsedRecord>; | Added| 21| ohos.privacyManager | BundleUsedRecord | bundleName: string; | Added| 22| ohos.privacyManager | BundleUsedRecord | deviceId: string; | Added| 23| ohos.privacyManager | BundleUsedRecord | isRemote: boolean; | Added| 24| ohos.privacyManager | BundleUsedRecord | tokenId: number; | Added| 25| ohos.privacyManager | PermissionUsedResponse | bundleRecords: Array\<BundleUsedRecord>; | Added| 26| ohos.privacyManager | PermissionUsedResponse | endTime: number; | Added| 27| ohos.privacyManager | PermissionUsedResponse | beginTime: number; | Added| 28| ohos.privacyManager | PermissionUsedRequest | flag: PermissionUsageFlag; | Added| 29| ohos.privacyManager | PermissionUsedRequest | endTime: number; | Added| 30| ohos.privacyManager | PermissionUsedRequest | beginTime: number; | Added| 31| ohos.privacyManager | PermissionUsedRequest | permissionNames: Array\<string>; | Added| 32| ohos.privacyManager | PermissionUsedRequest | bundleName: string; | Added| 33| ohos.privacyManager | PermissionUsedRequest | deviceId: string; | Added| 34| ohos.privacyManager | PermissionUsedRequest | isRemote: boolean; | Added| 35| ohos.privacyManager | PermissionUsedRequest | tokenId: number; | Added| 36| ohos.privacyManager | PermissionUsageFlag | FLAG_PERMISSION_USAGE_DETAIL = 1 | Added| 37| ohos.privacyManager | PermissionUsageFlag | FLAG_PERMISSION_USAGE_SUMMARY = 0 | Added| 38| ohos.privacyManager | privacyManager | getPermissionUsedRecords(request: PermissionUsedRequest): Promise\<PermissionUsedResponse>;<br>getPermissionUsedRecords(request: PermissionUsedRequest, callback: AsyncCallback\<PermissionUsedResponse>): void; | Added| 39| ohos.privacyManager | privacyManager | addPermissionUsedRecord(tokenID: number, permissionName: string, successCount: number, failCount: number): Promise\<number>;<br>addPermissionUsedRecord(tokenID: number, permissionName: string, successCount: number, failCount: number, callback: AsyncCallback\<number>): void; | Added| 40| ohos.security.huks | HuksTag | HUKS_TAG_UNWRAP_ALGORITHM_SUITE = HuksTagType.HUKS_TAG_TYPE_UINT \| 26 | Added| 41| ohos.security.huks | HuksTag | HUKS_TAG_IMPORT_KEY_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT \| 25 | Added| 42| ohos.security.huks | HuksImportKeyType | HUKS_KEY_TYPE_KEY_PAIR = 2 | Added| 43| ohos.security.huks | HuksImportKeyType | HUKS_KEY_TYPE_PRIVATE_KEY = 1 | Added| 44| ohos.security.huks | HuksImportKeyType | HUKS_KEY_TYPE_PUBLIC_KEY = 0 | Added| 45| ohos.security.huks | HuksUnwrapSuite | HUKS_UNWRAP_SUITE_ECDH_AES_256_GCM_NOPADDING = 2 | Added| 46| ohos.security.huks | HuksUnwrapSuite | HUKS_UNWRAP_SUITE_X25519_AES_256_GCM_NOPADDING = 1 | Added| 47| ohos.security.huks | HuksKeyAlg | HUKS_ALG_SM4 = 152 | Added| 48| ohos.security.huks | HuksKeyAlg | HUKS_ALG_SM3 = 151 | Added| 49| ohos.security.huks | HuksKeyAlg | HUKS_ALG_SM2 = 150 | Added| 50| ohos.security.huks | HuksKeySize | HUKS_SM4_KEY_SIZE_128 = 128 | Added| 51| ohos.security.huks | HuksKeySize | HUKS_SM2_KEY_SIZE_256 = 256 | Added| 52| ohos.security.huks | HuksKeyDigest | HUKS_DIGEST_SM3 = 2 | Added| 53| ohos.security.huks | HuksErrorCode | HUKS_ERROR_INVALID_USAGE_OF_KEY = -127 | Added| 54| ohos.security.huks | HuksErrorCode | HUKS_ERROR_INVALID_WRAPPED_FORMAT = -126 | Added| 55| ohos.security.huks | huks | importWrappedKey(keyAlias: string, wrappingKeyAlias: string, options: HuksOptions, callback: AsyncCallback\<HuksResult>) : void;<br>importWrappedKey(keyAlias: string, wrappingKeyAlias: string, options: HuksOptions) : Promise\<HuksResult>; | Added| 56