1# Obtaining Key Properties (ArkTS) 2 3 4This topic describes how to obtain properties of a key. Before the operation, ensure that the key exists in HUKS. 5>**NOTE**<br> 6> The mini-system devices do not support the operation for obtaining key properties. 7 8## How to Develop 9 101. Set the key alias (**keyAlias**), which cannot exceed 128 bytes. 11 122. Use [getKeyItemProperties](../../reference/apis-universal-keystore-kit/js-apis-huks.md#huksgetkeyitemproperties9) to obtain the properties of the key based on **keyAlias** and **options**. 13 **options** is a reserved parameter and is left empty currently. 14 153. You can find the key properties in the **properties** field in the [HuksReturnResult](../../reference/apis-universal-keystore-kit/js-apis-huks.md#huksreturnresult9) object. 16 17```ts 18import { huks } from '@kit.UniversalKeystoreKit'; 19 20/* 1. Set the key alias. */ 21let keyAlias = 'keyAlias'; 22/* Leave options empty. */ 23let emptyOptions: huks.HuksOptions = { 24 properties: [] 25}; 26try { 27 /* 2. Obtain key properties. */ 28 huks.getKeyItemProperties(keyAlias, emptyOptions, (error, data) => { 29 if (error) { 30 console.error(`callback: getKeyItemProperties failed, ` + JSON.stringify(error)); 31 } else { 32 console.info(`callback: getKeyItemProperties success, data = ${JSON.stringify(data)}`); 33 } 34 }); 35} catch (error) { 36 console.error(`callback: getKeyItemProperties input arg invalid, ` + JSON.stringify(error)); 37} 38``` 39