KeyType Property
The key's type.
Syntax
azurekeys.getKeyType(index, [callback])
Default Value
""
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getKeyType([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setKeyType([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
The key's type.
This property reflects the key's type. Each key type has two variants, a software-based one and an HSM-based one. Possible values for this property are shown in the first two columns of the following table:
Software-based | HSM-based | Description |
EC_P256 | EC_HSM_P256 | The NIST P-256 curve (SECP256R1). |
EC_P256K | EC_HSM_P256K | The SECP256K1 curve. |
EC_P384 | EC_HSM_P384 | The NIST P-384 curve (SECP384R1). |
EC_P521 | EC_HSM_P521 | The NIST P-521 curve (SECP521R1). |
RSA_2048 | RSA_HSM_2048 | 2048-bit RSA key. |
RSA_3072 | RSA_HSM_3072 | 3072-bit RSA key. |
RSA_4096 | RSA_HSM_4096 | 4096-bit RSA key. |
The index parameter specifies the index of the item in the array. The size of the array is controlled by the KeyCount property.
This property is read-only and not available at design time.
Data Type
String