KeyImport
This API imports key into the key management appliances.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/keyImport
Input Parameters
Parameters | Description |
---|---|
username | User name (optional). |
password | Password associated with the user (optional). |
keyname | Name of the key to import. |
keyalgorithm | Algorithm to be used. Possible options are: — AES — RSA — EC — Hmac |
keyisdeletable | Determines whether the imported key will be deletable via the API – boolean, default is false. |
keyisexportable | Determines whether the imported key will be exportable via the API – boolean, default is false. |
keybytes | The bytes for key to be imported. |
certAlias | Client certificate alias for making SSL connections (optional). |
certPass | Password for the provided certificate alias (optional). |
Sample REST call for cxf
request
{
"Key_Import": {
"username": "cryptouser",
"password": "safenet123",
"keyname": "gddh",
"keyalgorithm": "AES",
"keyisdeletable": "true",
"keyisexportable": "true",
"keybytes": "110DAB8A90056E5255ECD84AF224543A"
}
}
response
{
"KeyImportResponse": {
"keyImportResult": "true"
}
}
Sample SOAP Parameters
<prot:Key_Import>
<username>cryptouser</username>
<password>qwerty1234</password>
<keyname>aes256vtimported</keyname>
<keyalgorithm>AES</keyalgorithm>
<keyisdeletable>true</keyisdeletable>
<keyisexportable>true</keyisexportable>
<keybytes>68711F03ABEE8B460509D5D54E7C70D3A78ABE21572746D31C433A797093B2CC</keybytes>
</prot:Key_Import>
Output
boolean – indicate if key import was successful.
<ns1:Key_ImportResponse xmlns:ns1="http://dsws.org/protectappws/">true</ns1:Key_ImportResponse>