From 77bac7340eb1b09ae07ef0c4e02b7ab3f035a130 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Thu, 6 Jul 2023 20:41:31 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- .../reference/apis/js-apis-huks.md | 442 +++++++++--------- 1 file changed, 221 insertions(+), 221 deletions(-) diff --git a/en/application-dev/reference/apis/js-apis-huks.md b/en/application-dev/reference/apis/js-apis-huks.md index 11c2f8d4ea..911af6e587 100644 --- a/en/application-dev/reference/apis/js-apis-huks.md +++ b/en/application-dev/reference/apis/js-apis-huks.md @@ -17,7 +17,7 @@ import huks from '@ohos.security.huks' Defines the **param** in the **properties** array of **options** used in the APIs. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name| Type | Mandatory| Description | | ------ | ----------------------------------- | ---- | ------------ | @@ -28,7 +28,7 @@ Defines the **param** in the **properties** array of **options** used in the API Defines the **options** used in the APIs. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Type | Mandatory| Description | | ---------- | ----------------- | ---- | ------------------------ | @@ -39,7 +39,7 @@ Defines the **options** used in the APIs. Defines the HUKS handle structure. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Type | Mandatory| Description | | --------- | ---------- | ---- | ---------------------------------------------------- | @@ -48,9 +48,9 @@ Defines the HUKS handle structure. ## HuksReturnResult9+ -Defines the **HuksResult** structure. +Defines the **HuksResult** struct. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core @@ -67,7 +67,7 @@ generateKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ Generates a key. This API uses an asynchronous callback to return the result. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core **Parameters** @@ -142,7 +142,7 @@ generateKeyItem(keyAlias: string, options: HuksOptions) : Promise\ Generates a key. This API uses a promise to return the result. Because the key is always protected in an trusted environment (such as a TEE), the promise does not return the key content. It returns only the information indicating whether the API is successfully called. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -216,7 +216,7 @@ deleteKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ Deletes a key. This API uses a promise to return the result. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -317,7 +317,7 @@ getSdkVersion(options: HuksOptions) : string Obtains the SDK version of the current system. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -347,7 +347,7 @@ importKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ Imports a key in plaintext. This API uses a promise to return the result. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -524,7 +524,7 @@ attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ Checks whether a key exists. This API uses a promise to return the result. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -1432,7 +1432,7 @@ let keyAlias = 'keyAlias'; let emptyOptions = { properties: [] }; -await huks.isKeyItemExist(keyAlias, emptyOptions).then((data) => { +huks.isKeyItemExist(keyAlias, emptyOptions).then((data) => { promptAction.showToast({ message: "keyAlias: " + keyAlias +"is existed! ", duration: 500, @@ -1451,7 +1451,7 @@ initSession(keyAlias: string, options: HuksOptions, callback: AsyncCallback\; Aborts a key operation. This API uses a promise to return the result. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2087,7 +2087,7 @@ Enumerates the error codes. For details about the error codes, see [KUKS Error Codes](../errorcodes/errorcode-huks.md). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value| Description | | ---------------------------------------------- | -------- |--------------------------- | @@ -2114,25 +2114,25 @@ For details about the error codes, see [KUKS Error Codes](../errorcodes/errorcod Enumerates the key purposes. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | ------------------------ | ---- | -------------------------------- | -| HUKS_KEY_PURPOSE_ENCRYPT | 1 | Used to encrypt the plaintext.| -| HUKS_KEY_PURPOSE_DECRYPT | 2 | Used to decrypt the cipher text.| -| HUKS_KEY_PURPOSE_SIGN | 4 | Used for signing. | -| HUKS_KEY_PURPOSE_VERIFY | 8 | Used to verify the signature. | -| HUKS_KEY_PURPOSE_DERIVE | 16 | Used to derive a key. | -| HUKS_KEY_PURPOSE_WRAP | 32 | Used for an encrypted export. | -| HUKS_KEY_PURPOSE_UNWRAP | 64 | Used for an encrypted import. | -| HUKS_KEY_PURPOSE_MAC | 128 | Used to generate a message authentication code (MAC). | -| HUKS_KEY_PURPOSE_AGREE | 256 | Used for key agreement. | +| HUKS_KEY_PURPOSE_ENCRYPT | 1 | Used to encrypt the plaintext.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_KEY_PURPOSE_DECRYPT | 2 | Used to decrypt the cipher text.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_KEY_PURPOSE_SIGN | 4 | Used for signing.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_VERIFY | 8 | Used to verify the signature.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_DERIVE | 16 | Used to derive a key.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_WRAP | 32 | Used for an encrypted export.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_UNWRAP | 64 | Used for an encrypted import.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_MAC | 128 | Used to generate a message authentication code (MAC).
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_AGREE | 256 | Used for key agreement.
**System capability**: SystemCapability.Security.Huks.Extension| ## HuksKeyDigest Enumerates the digest algorithms. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ---------------------- | ---- | ---------------------------------------- | @@ -2149,89 +2149,89 @@ Enumerates the digest algorithms. Enumerates the padding algorithms. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | ---------------------- | ---- | ---------------------------------------- | -| HUKS_PADDING_NONE | 0 | No padding algorithm| -| HUKS_PADDING_OAEP | 1 | Optimal Asymmetric Encryption Padding (OAEP)| -| HUKS_PADDING_PSS | 2 | Probabilistic Signature Scheme (PSS)| -| HUKS_PADDING_PKCS1_V1_5 | 3 | Public Key Cryptography Standards (PKCS) #1 v1.5| -| HUKS_PADDING_PKCS5 | 4 | PKCS #5| -| HUKS_PADDING_PKCS7 | 5 | PKCS #7| +| HUKS_PADDING_NONE | 0 | No padding algorithm
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_PADDING_OAEP | 1 | Optimal Asymmetric Encryption Padding (OAEP)
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PSS | 2 | Probabilistic Signature Scheme (PSS)
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PKCS1_V1_5 | 3 | Public Key Cryptography Standards (PKCS) #1 v1.5
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PKCS5 | 4 | PKCS #5
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PKCS7 | 5 | PKCS #7
**System capability**: SystemCapability.Security.Huks.Core| ## HuksCipherMode Enumerates the cipher modes. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | ------------- | ---- | --------------------- | -| HUKS_MODE_ECB | 1 | Electronic Code Block (ECB) mode| -| HUKS_MODE_CBC | 2 | Cipher Block Chaining (CBC) mode| -| HUKS_MODE_CTR | 3 | Counter (CTR) mode| -| HUKS_MODE_OFB | 4 | Output Feedback (OFB) mode| -| HUKS_MODE_CCM | 31 | Counter with CBC-MAC (CCM) mode| -| HUKS_MODE_GCM | 32 | Galois/Counter (GCM) mode| +| HUKS_MODE_ECB | 1 | Electronic Code Block (ECB) mode
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_MODE_CBC | 2 | Cipher Block Chaining (CBC) mode
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_MODE_CTR | 3 | Counter (CTR) mode
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_MODE_OFB | 4 | Output Feedback (OFB) mode
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_MODE_CCM | 31 | Counter with CBC-MAC (CCM) mode
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_MODE_GCM | 32 | Galois/Counter (GCM) mode
**System capability**: SystemCapability.Security.Huks.Core| ## HuksKeySize Enumerates the key sizes. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | ---------------------------------- | ---- | ------------------------------------------ | -| HUKS_RSA_KEY_SIZE_512 | 512 | Rivest-Shamir-Adleman (RSA) key of 512 bits | -| HUKS_RSA_KEY_SIZE_768 | 768 | RSA key of 768 bits | -| HUKS_RSA_KEY_SIZE_1024 | 1024 | RSA key of 1024 bits | -| HUKS_RSA_KEY_SIZE_2048 | 2048 | RSA key of 2048 bits | -| HUKS_RSA_KEY_SIZE_3072 | 3072 | RSA key of 3072 bits | -| HUKS_RSA_KEY_SIZE_4096 | 4096 | RSA key of 4096 bits | -| HUKS_ECC_KEY_SIZE_224 | 224 | Elliptic Curve Cryptography (ECC) key of 224 bits | -| HUKS_ECC_KEY_SIZE_256 | 256 | ECC key of 256 bits | -| HUKS_ECC_KEY_SIZE_384 | 384 | ECC key of 384 bits | -| HUKS_ECC_KEY_SIZE_521 | 521 | ECC key of 521 bits | -| HUKS_AES_KEY_SIZE_128 | 128 | Advanced Encryption Standard (AES) key of 128 bits | -| HUKS_AES_KEY_SIZE_192 | 192 | AES key of 192 bits | -| HUKS_AES_KEY_SIZE_256 | 256 | AES key of 256 bits | -| HUKS_AES_KEY_SIZE_512 | 512 | AES key of 512 bits | -| HUKS_CURVE25519_KEY_SIZE_256 | 256 | Curve25519 key of 256 bits| -| HUKS_DH_KEY_SIZE_2048 | 2048 | Diffie-Hellman (DH) key of 2048 bits | -| HUKS_DH_KEY_SIZE_3072 | 3072 | DH key of 3072 bits | -| HUKS_DH_KEY_SIZE_4096 | 4096 | DH key of 4096 bits | -| HUKS_SM2_KEY_SIZE_2569+ | 256 | ShangMi2 (SM2) key of 256 bits | -| HUKS_SM4_KEY_SIZE_1289+ | 128 | ShangMi4 (SM4) key of 128 bits | +| HUKS_RSA_KEY_SIZE_512 | 512 | Rivest-Shamir-Adleman (RSA) key of 512 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_768 | 768 | RSA key of 768 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_1024 | 1024 | RSA key of 1024 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_2048 | 2048 | RSA key of 2048 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_3072 | 3072 | RSA key of 3072 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_4096 | 4096 | RSA key of 4096 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_224 | 224 | Elliptic Curve Cryptography (ECC) key of 224 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_256 | 256 | ECC key of 256 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_384 | 384 | ECC key of 384 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_521 | 521 | ECC key of 521 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_AES_KEY_SIZE_128 | 128 | Advanced Encryption Standard (AES) key of 128 bits
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_AES_KEY_SIZE_192 | 192 | AES key of 192 bits
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_AES_KEY_SIZE_256 | 256 | AES key of 256 bits
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_AES_KEY_SIZE_512 | 512 | AES key of 512 bits
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_CURVE25519_KEY_SIZE_256 | 256 | Curve25519 key of 256 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_DH_KEY_SIZE_2048 | 2048 | Diffie-Hellman (DH) key of 2048 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_DH_KEY_SIZE_3072 | 3072 | DH key of 3072 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_DH_KEY_SIZE_4096 | 4096 | DH key of 4096 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_SM2_KEY_SIZE_2569+ | 256 | ShangMi2 (SM2) key of 256 bits
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_SM4_KEY_SIZE_1289+ | 128 | ShangMi4 (SM4) key of 128 bits
**System capability**: SystemCapability.Security.Huks.Extension| ## HuksKeyAlg Enumerates the key algorithms. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | ------------------------- | ---- | --------------------- | -| HUKS_ALG_RSA | 1 | RSA | -| HUKS_ALG_ECC | 2 | ECC | -| HUKS_ALG_DSA | 3 | DSA | -| HUKS_ALG_AES | 20 | AES | -| HUKS_ALG_HMAC | 50 | HMAC | -| HUKS_ALG_HKDF | 51 | HKDF | -| HUKS_ALG_PBKDF2 | 52 | PBKDF2 | -| HUKS_ALG_ECDH | 100 | ECDH | -| HUKS_ALG_X25519 | 101 | X25519 | -| HUKS_ALG_ED25519 | 102 | ED25519| -| HUKS_ALG_DH | 103 | DH | -| HUKS_ALG_SM29+ | 150 | SM2 | -| HUKS_ALG_SM39+ | 151 | SM3 | -| HUKS_ALG_SM49+ | 152 | SM4 | +| HUKS_ALG_RSA | 1 | RSA
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_ECC | 2 | ECC
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_DSA | 3 | DSA
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_AES | 20 | AES
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_ALG_HMAC | 50 | HMAC
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_HKDF | 51 | HKDF
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_PBKDF2 | 52 | PBKDF2
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_ECDH | 100 | ECDH
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_X25519 | 101 | X25519
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_ED25519 | 102 | ED25519
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_DH | 103 | DH
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_SM29+ | 150 | SM2
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_SM39+ | 151 | SM3
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_ALG_SM49+ | 152 | SM4
**System capability**: SystemCapability.Security.Huks.Extension| ## HuksKeyGenerateType Enumerates the key generation types. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ------------------------------ | ---- | ---------------- | @@ -2243,7 +2243,7 @@ Enumerates the key generation types. Enumerates the key generation modes. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | -------------------------- | ---- | ------------------------------------ | @@ -2256,20 +2256,20 @@ Enumerates the key generation modes. Enumerates the key storage modes. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | -------------------------------------------- | ---- | ------------------------------ | -| HUKS_STORAGE_TEMP | 0 | The key is managed locally. | -| HUKS_STORAGE_PERSISTENT | 1 | The key is managed by the HUKS service.| -| HUKS_STORAGE_ONLY_USED_IN_HUKS10+ | 2 | The key is stored only in the HUKS. | -| HUKS_STORAGE_KEY_EXPORT_ALLOWED10+ | 3 | The key is exported from the HUKS and is not stored.| +| HUKS_STORAGE_TEMP(deprecated) | 0 | The key is managed locally.
**NOTE**: This tag is discarded since API version 10. No substitute is provided because this tag is not used in key management. In key derivation scenarios, use **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED**.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_STORAGE_PERSISTENT(deprecated) | 1 | The key is managed by the HUKS service.
**NOTE**: This tag is discarded since API version 10. No substitute is provided because this tag is not used in key management. In key derivation scenarios, use **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED**.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_STORAGE_ONLY_USED_IN_HUKS10+ | 2 | The key derived from the master key is stored in the HUKS and managed by the HUKS.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_STORAGE_KEY_EXPORT_ALLOWED10+ | 3 | The key derived from the master key is exported to the service, and not managed by the HUKS.
**System capability**: SystemCapability.Security.Huks.Extension| ## HuksSendType Enumerates the tag transfer modes. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | -------------------- | ---- | ----------------- | @@ -2280,7 +2280,7 @@ Enumerates the tag transfer modes. Enumerates the algorithm suites used for importing an encrypted key. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ---------------------------------------------- | ---- | ----------------------------------------------------- | @@ -2291,7 +2291,7 @@ Enumerates the algorithm suites used for importing an encrypted key. Enumerates the types of keys to import. By default, a public key is imported. This field is not required when a symmetric key is imported. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ------------------------- | ---- | ------------------------------ | @@ -2303,7 +2303,7 @@ Enumerates the types of keys to import. By default, a public key is imported. Th Enumerates the **salt_len** types to set when PSS padding is used in RSA signing or signature verification. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ------------------------------------------ | ---- | ---------------------------- | @@ -2314,7 +2314,7 @@ Enumerates the **salt_len** types to set when PSS padding is used in RSA signing Enumerates the user authentication types. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ------------------------------- | ---- | ------------------------- | @@ -2326,7 +2326,7 @@ Enumerates the user authentication types. Enumerates the access control types. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | --------------------------------------- | ---- | ------------------------------------------------ | @@ -2337,7 +2337,7 @@ Enumerates the access control types. Enumerates the types of the challenges generated when a key is used. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ------------------------------- | ---- | ------------------------------ | @@ -2349,7 +2349,7 @@ Enumerates the types of the challenges generated when a key is used. Enumerates the positions of the 8-byte valid value in a custom challenge generated. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ------------------------------- | ---- | ------------------------------ | @@ -2362,7 +2362,7 @@ Enumerates the positions of the 8-byte valid value in a custom challenge generat Defines the signature type of the key generated or imported. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension | Name | Value | Description | | ------------------------------ | ---- | ------------------------------------------------------------ | @@ -2372,7 +2372,7 @@ Defines the signature type of the key generated or imported. Enumerates the tag data types. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | --------------------- | ------- | --------------------------------------- | @@ -2387,95 +2387,95 @@ Enumerates the tag data types. Enumerates the tags used to invoke parameters. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Core | Name | Value | Description | | -------------------------------------------- | ---------------------------------------- | -------------------------------------- | -| HUKS_TAG_INVALID | HuksTagType.HUKS_TAG_TYPE_INVALID \| 0 | Invalid tag. | -| HUKS_TAG_ALGORITHM | HuksTagType.HUKS_TAG_TYPE_UINT \| 1 | Algorithm. | -| HUKS_TAG_PURPOSE | HuksTagType.HUKS_TAG_TYPE_UINT \| 2 | Purpose of the key. | -| HUKS_TAG_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 3 | Key size. | -| HUKS_TAG_DIGEST | HuksTagType.HUKS_TAG_TYPE_UINT \| 4 | Digest algorithm. | -| HUKS_TAG_PADDING | HuksTagType.HUKS_TAG_TYPE_UINT \| 5 | Padding algorithm. | -| HUKS_TAG_BLOCK_MODE | HuksTagType.HUKS_TAG_TYPE_UINT \| 6 | Cipher mode. | -| HUKS_TAG_KEY_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 7 | Key type. | -| HUKS_TAG_ASSOCIATED_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 8 | Associated authentication data. | -| HUKS_TAG_NONCE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 9 | Field for key encryption and decryption. | -| HUKS_TAG_IV | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10 | IV. | -| HUKS_TAG_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 11 | Information generated during key derivation. | -| HUKS_TAG_SALT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 12 | Salt value used for key derivation. | -| HUKS_TAG_PWD | HuksTagType.HUKS_TAG_TYPE_BYTES \| 13 | Password used for key derivation. | -| HUKS_TAG_ITERATION | HuksTagType.HUKS_TAG_TYPE_UINT \| 14 | Number of iterations for key derivation. | -| HUKS_TAG_KEY_GENERATE_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 15 | Key generation type. | -| HUKS_TAG_DERIVE_MAIN_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 16 | Main key for key derivation. | -| HUKS_TAG_DERIVE_FACTOR | HuksTagType.HUKS_TAG_TYPE_BYTES \| 17 | Factor for key derivation. | -| HUKS_TAG_DERIVE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 18 | Type of the algorithm used for key derivation. | -| HUKS_TAG_AGREE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 19 | Type of the algorithm used for key agreement. | -| HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 20 | Public key alias used in key agreement. | -| HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 21 | Private key alias used in key agreement. | -| HUKS_TAG_AGREE_PUBLIC_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 22 | Public key used in key agreement. | -| HUKS_TAG_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 23 | Key alias. | -| HUKS_TAG_DERIVE_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 24 | Size of the derived key. | -| HUKS_TAG_IMPORT_KEY_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 25 | Type of the imported key. | -| HUKS_TAG_UNWRAP_ALGORITHM_SUITE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 26 | Algorithm suite required for encrypted imports. | -| HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|29 | Storage type of the derived key or agreed key.| -| HUKS_TAG_RSA_PSS_SALT_LEN_TYPE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|30 | Type of the **rsa_pss_salt_length**.| -| HUKS_TAG_ACTIVE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 201 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module. | -| HUKS_TAG_ORIGINATION_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 202 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module. | -| HUKS_TAG_USAGE_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 203 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module. | -| HUKS_TAG_CREATION_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 204 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module. | -| HUKS_TAG_ALL_USERS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 301 | Reserved. | -| HUKS_TAG_USER_ID | HuksTagType.HUKS_TAG_TYPE_UINT \| 302 | ID of the user to which the key belongs. | -| HUKS_TAG_NO_AUTH_REQUIRED | HuksTagType.HUKS_TAG_TYPE_BOOL \| 303 | Reserved. | -| HUKS_TAG_USER_AUTH_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 304 | User authentication type. For details, see [HuksUserAuthType](#huksuserauthtype9). This parameter must be set together with [HuksAuthAccessType](#huksauthaccesstype9). You can set a maximum of two user authentication types at a time. For example, if **HuksAuthAccessType** is **HKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL**, you can set two of **HKS_USER_AUTH_TYPE_FACE**, **HKS_USER_AUTH_TYPE_FINGERPRINT**, and **HKS_USER_AUTH_TYPE_FACE\**.| HKS_USER_AUTH_TYPE_FINGERPRINT | -| HUKS_TAG_AUTH_TIMEOUT | HuksTagType.HUKS_TAG_TYPE_UINT \| 305 | Timeout period of an authentication token. | -| HUKS_TAG_AUTH_TOKEN | HuksTagType.HUKS_TAG_TYPE_BYTES \| 306 | Used to pass in the authentication token. | -| HUKS_TAG_KEY_AUTH_ACCESS_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 307 | Access control type. For details, see [HuksAuthAccessType](#huksauthaccesstype9). This parameter must be set together with [HuksUserAuthType](#huksuserauthtype9).| -| HUKS_TAG_KEY_SECURE_SIGN_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 308 | Signature type of the key generated or imported.| -| HUKS_TAG_CHALLENGE_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 309 | Type of the challenge generated for a key. For details, see [HuksChallengeType](#hukschallengetype9).| -| HUKS_TAG_CHALLENGE_POS9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 310 | Position of the 8-byte valid value in a custom challenge. For details, see [HuksChallengePosition](#hukschallengeposition9).| -| HUKS_TAG_KEY_AUTH_PURPOSE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|311 | Key authentication purpose.| -| HUKS_TAG_ATTESTATION_CHALLENGE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 501 | Challenge value used in the attestation. | -| HUKS_TAG_ATTESTATION_APPLICATION_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 502 | Application ID used in the attestation. | -| HUKS_TAG_ATTESTATION_ID_BRAND | HuksTagType.HUKS_TAG_TYPE_BYTES \| 503 | Brand of the device. | -| HUKS_TAG_ATTESTATION_ID_DEVICE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 504 | ID of the device. | -| HUKS_TAG_ATTESTATION_ID_PRODUCT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 505 | Product name of the device. | -| HUKS_TAG_ATTESTATION_ID_SERIAL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 506 | SN of the device. | -| HUKS_TAG_ATTESTATION_ID_IMEI | HuksTagType.HUKS_TAG_TYPE_BYTES \| 507 | International mobile equipment identity (IMEI) of the device. | -| HUKS_TAG_ATTESTATION_ID_MEID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 508 | Mobile equipment identity (MEID) of the device. | -| HUKS_TAG_ATTESTATION_ID_MANUFACTURER | HuksTagType.HUKS_TAG_TYPE_BYTES \| 509 | Manufacturer of the device. | -| HUKS_TAG_ATTESTATION_ID_MODEL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 510 | Device model. | -| HUKS_TAG_ATTESTATION_ID_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 511 | Key alias used in the attestation. | -| HUKS_TAG_ATTESTATION_ID_SOCID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 512 | System-on-a-chip (SoCID) of the device. | -| HUKS_TAG_ATTESTATION_ID_UDID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 513 | Unique device identifier (UDID) of the device. | -| HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 514 | Security level used in the attestation. | -| HUKS_TAG_ATTESTATION_ID_VERSION_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 515 | Version information used in the attestation. | -| HUKS_TAG_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1001 | Whether to use the alias passed in during key generation.| -| HUKS_TAG_KEY_STORAGE_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1002 | Key storage mode. | -| HUKS_TAG_IS_ALLOWED_WRAP | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1003 | Reserved. | -| HUKS_TAG_KEY_WRAP_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1004 | Reserved. | -| HUKS_TAG_KEY_AUTH_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1005 | Reserved. | -| HUKS_TAG_KEY_ROLE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1006 | Reserved. | -| HUKS_TAG_KEY_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1007 | Flag of the key. | -| HUKS_TAG_IS_ASYNCHRONIZED | HuksTagType.HUKS_TAG_TYPE_UINT \| 1008 | Reserved. | -| HUKS_TAG_SECURE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1009 | Reserved. | -| HUKS_TAG_SECURE_KEY_UUID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1010 | Reserved. | -| HUKS_TAG_KEY_DOMAIN | HuksTagType.HUKS_TAG_TYPE_UINT \| 1011 | Reserved. | -| HUKS_TAG_PROCESS_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10001 | Process name. | -| HUKS_TAG_PACKAGE_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10002 | Reserved. | -| HUKS_TAG_ACCESS_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10003 | Reserved. | -| HUKS_TAG_USES_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10004 | Reserved. | -| HUKS_TAG_CRYPTO_CTX | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10005 | Reserved. | -| HUKS_TAG_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10006 | Reserved. | -| HUKS_TAG_KEY_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10007 | Key version. | -| HUKS_TAG_PAYLOAD_LEN | HuksTagType.HUKS_TAG_TYPE_UINT \| 10008 | Reserved. | -| HUKS_TAG_AE_TAG | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10009 | Used to pass in the AEAD in GCM mode. | -| HUKS_TAG_IS_KEY_HANDLE | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10010 | Reserved. | -| HUKS_TAG_OS_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10101 | OS version. | -| HUKS_TAG_OS_PATCHLEVEL | HuksTagType.HUKS_TAG_TYPE_UINT \| 10102 | OS patch level. | -| HUKS_TAG_SYMMETRIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20001 | Reserved. | -| HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20002 | Reserved. | -| HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20003 | Reserved. | +| HUKS_TAG_INVALID | HuksTagType.HUKS_TAG_TYPE_INVALID \| 0 | Invalid tag.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_ALGORITHM | HuksTagType.HUKS_TAG_TYPE_UINT \| 1 | Algorithm.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_PURPOSE | HuksTagType.HUKS_TAG_TYPE_UINT \| 2 | Purpose of the key.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 3 | Key size.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_DIGEST | HuksTagType.HUKS_TAG_TYPE_UINT \| 4 | Digest algorithm.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_PADDING | HuksTagType.HUKS_TAG_TYPE_UINT \| 5 | Padding algorithm.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_BLOCK_MODE | HuksTagType.HUKS_TAG_TYPE_UINT \| 6 | Cipher mode.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 7 | Key type.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_ASSOCIATED_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 8 | Associated authentication data.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_NONCE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 9 | Field for key encryption and decryption.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_IV | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10 | IV.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 11 | Information generated during key derivation.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_SALT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 12 | Salt value used for key derivation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_PWD | HuksTagType.HUKS_TAG_TYPE_BYTES \| 13 | Password used for key derivation.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_ITERATION | HuksTagType.HUKS_TAG_TYPE_UINT \| 14 | Number of iterations for key derivation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_GENERATE_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 15 | Key generation type.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_DERIVE_MAIN_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 16 | Main key for key derivation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_DERIVE_FACTOR | HuksTagType.HUKS_TAG_TYPE_BYTES \| 17 | Factor for key derivation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_DERIVE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 18 | Type of the algorithm used for key derivation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 19 | Type of the algorithm used for key agreement.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 20 | Public key alias used in key agreement.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 21 | Private key alias used in key agreement.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_PUBLIC_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 22 | Public key used in key agreement.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 23 | Key alias.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_DERIVE_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 24 | Size of the derived key.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_IMPORT_KEY_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 25 | Type of the imported key.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_UNWRAP_ALGORITHM_SUITE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 26 | Algorithm suite required for encrypted imports.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|29 | Storage type of the derived key or agreed key.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_RSA_PSS_SALT_LEN_TYPE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|30 | Type of the **rsa_pss_salt_length**.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ACTIVE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 201 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ORIGINATION_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 202 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_USAGE_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 203 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_CREATION_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 204 | Parameter originally reserved for certificate management. It is deprecated because certificate management is no longer implemented in this module.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_ALL_USERS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 301 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_USER_ID | HuksTagType.HUKS_TAG_TYPE_UINT \| 302 | ID of the user to which the key belongs.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_NO_AUTH_REQUIRED | HuksTagType.HUKS_TAG_TYPE_BOOL \| 303 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_USER_AUTH_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 304 | User authentication type. For details, see [HuksUserAuthType](#huksuserauthtype9). This parameter must be set together with [HuksAuthAccessType](#huksauthaccesstype9). You can set a maximum of two user authentication types at a time. For example, if **HuksAuthAccessType** is **HKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL**, you can set two of **HKS_USER_AUTH_TYPE_FACE**, **HKS_USER_AUTH_TYPE_FINGERPRINT**, and **HKS_USER_AUTH_TYPE_FACE\**.| HKS_USER_AUTH_TYPE_FINGERPRINT
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AUTH_TIMEOUT | HuksTagType.HUKS_TAG_TYPE_UINT \| 305 | Timeout period of an authentication token.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AUTH_TOKEN | HuksTagType.HUKS_TAG_TYPE_BYTES \| 306 | Used to pass in the authentication token.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_AUTH_ACCESS_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 307 | Access control type. For details, see [HuksAuthAccessType](#huksauthaccesstype9). This parameter must be set together with [HuksUserAuthType](#huksuserauthtype9).
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_SECURE_SIGN_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 308 | Signature type of the key generated or imported.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_CHALLENGE_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 309 | Type of the challenge generated for a key. For details, see [HuksChallengeType](#hukschallengetype9).
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_CHALLENGE_POS9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 310 | Position of the 8-byte valid value in a custom challenge. For details, see [HuksChallengePosition](#hukschallengeposition9).
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_AUTH_PURPOSE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|311 | Key authentication purpose.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_CHALLENGE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 501 | Challenge value used in the attestation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_APPLICATION_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 502 | Application ID used in the attestation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_BRAND | HuksTagType.HUKS_TAG_TYPE_BYTES \| 503 | Brand of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_DEVICE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 504 | ID of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_PRODUCT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 505 | Product name of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_SERIAL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 506 | SN of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_IMEI | HuksTagType.HUKS_TAG_TYPE_BYTES \| 507 | International mobile equipment identity (IMEI) of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_MEID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 508 | Mobile equipment identity (MEID) of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_MANUFACTURER | HuksTagType.HUKS_TAG_TYPE_BYTES \| 509 | Manufacturer of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_MODEL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 510 | Device model.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 511 | Key alias used in the attestation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_SOCID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 512 | System-on-a-chip (SoCID) of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_UDID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 513 | Unique device identifier (UDID) of the device.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 514 | Security level used in the attestation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_VERSION_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 515 | Version information used in the attestation.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1001 | Whether to use the alias passed in during key generation.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_STORAGE_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1002 | Key storage mode.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_IS_ALLOWED_WRAP | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1003 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_WRAP_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1004 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_AUTH_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1005 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_ROLE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1006 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1007 | Flag of the key.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_IS_ASYNCHRONIZED | HuksTagType.HUKS_TAG_TYPE_UINT \| 1008 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_SECURE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1009 | Reserved.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_SECURE_KEY_UUID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1010 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_DOMAIN | HuksTagType.HUKS_TAG_TYPE_UINT \| 1011 | Reserved.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_PROCESS_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10001 | Process name.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_PACKAGE_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10002 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ACCESS_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10003 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_USES_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10004 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_CRYPTO_CTX | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10005 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10006 | Reserved.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10007 | Key version.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_PAYLOAD_LEN | HuksTagType.HUKS_TAG_TYPE_UINT \| 10008 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AE_TAG | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10009 | Used to pass in the AEAD in GCM mode.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_IS_KEY_HANDLE | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10010 | Reserved.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_OS_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10101 | OS version.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_OS_PATCHLEVEL | HuksTagType.HUKS_TAG_TYPE_UINT \| 10102 | OS patch level.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_SYMMETRIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20001 | Reserved.
**System capability**: SystemCapability.Security.Huks.Core| +| HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20002 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20003 | Reserved.
**System capability**: SystemCapability.Security.Huks.Extension| ## huks.generateKey(deprecated) @@ -2485,7 +2485,7 @@ Generates a key. This API uses an asynchronous callback to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.generateKeyItem9+](#huksgeneratekeyitem9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2537,7 +2537,7 @@ Generates a key. This API uses a promise to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.generateKeyItem9+](#huksgeneratekeyitem9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2590,7 +2590,7 @@ Deletes a key. This API uses an asynchronous callback to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.deleteKeyItem9+](#huksdeletekeyitem9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2619,7 +2619,7 @@ Deletes a key. This API uses a promise to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.deleteKeyItem9+](#huksdeletekeyitem9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2653,7 +2653,7 @@ Imports a key in plaintext. This API uses an asynchronous callback to return the > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.importKeyItem9+](#huksimportkeyitem9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2713,7 +2713,7 @@ Imports a key in plaintext. This API uses a promise to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.importKeyItem9+](#huksimportkeyitem9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2780,7 +2780,7 @@ Exports a key. This API uses an asynchronous callback to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.exportKeyItem9+](#huksexportkeyitem9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2809,7 +2809,7 @@ Exports a key. This API uses a promise to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.exportKeyItem9+](#huksexportkeyitem9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2843,7 +2843,7 @@ Obtains key properties. This API uses an asynchronous callback to return the res > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.getKeyItemProperties9+](#huksgetkeyitemproperties9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2872,7 +2872,7 @@ Obtains key properties. This API uses a promise to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.getKeyItemProperties9+](#huksgetkeyitemproperties9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2906,7 +2906,7 @@ Checks whether a key exists. This API uses an asynchronous callback to return th > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.isKeyItemExist9+](#huksiskeyitemexist9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2935,7 +2935,7 @@ Checks whether a key exists. This API uses a promise to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.isKeyItemExist9+](#huksiskeyitemexist9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2969,7 +2969,7 @@ Initializes the data for a key operation. This API uses an asynchronous callback > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.initSession9+](#huksinitsession9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -2987,7 +2987,7 @@ Initializes the data for a key operation. This API uses a promise to return the > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.initSession9+](#huksinitsession9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -3010,7 +3010,7 @@ Updates the key operation by segment. This API uses an asynchronous callback to > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.updateSession9+](#huksupdatesession9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -3029,7 +3029,7 @@ Updates the key operation by segment. This API uses a promise to return the resu > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.updateSession9+](#huksupdatesession9-2). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -3053,7 +3053,7 @@ Completes the key operation and releases resources. This API uses an asynchronou > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.finishSession9+](#huksfinishsession9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -3071,7 +3071,7 @@ Completes the key operation and releases resources. This API uses a promise to r > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.finishSession9+](#huksfinishsession9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -3094,7 +3094,7 @@ Aborts the use of the key. This API uses an asynchronous callback to return the > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.abortSession9+](#huksabortsession9). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -3205,7 +3205,7 @@ Aborts the use of the key. This API uses a promise to return the result. > **NOTE**
This API is deprecated since API version 9. You are advised to use [huks.abortSession9+](#huksabortsession9-1). -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension **Parameters** @@ -3323,7 +3323,7 @@ function huksAbort() { Defines the HUKS handle structure. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension > **NOTE**
This API is deprecated since API version 9. You are advised to use [HuksSessionHandle9+](#hukssessionhandle9). | Name | Type | Mandatory| Description | @@ -3336,7 +3336,7 @@ Defines the HUKS handle structure. Defines the **HuksResult** structure. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension > **NOTE**
This API is deprecated since API version 9. You are advised to use [HuksReturnResult9+](#huksreturnresult9). @@ -3352,7 +3352,7 @@ Defines the **HuksResult** structure. Enumerates the error codes. -**System capability**: SystemCapability.Security.Huks +**System capability**: SystemCapability.Security.Huks.Extension > **NOTE**
This API is deprecated since API version 9. You are advised to use HuksExceptionErrCode9+](#huksexceptionerrcode9). | Name | Value | Description| -- GitLab