KeyGen
This API generates keys.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/keyGen
Input Parameters
Parameters | Description |
---|---|
username | User name. |
password | Password asociated with the user. |
keyname | Name of the new key to be created. |
keyalgorithm | Algorithm to be used for key generation. Possible options are: —RSA-2048 —RSA-3072 —RSA-4096 — AES-128 — AES-192 — AES-256 — HmacSHA1 — HmacSHA256 — HmacSHA384 — HmacSHA512 — EC-secp224k1-225 — EC-secp224r1-224 — EC-secp256k1-256 — EC-secp384r1-384 — EC-secp521r1-521 — EC-prime256v1-256 — EC-brainpoolP224r1-224 — EC-brainpoolP224t1-224 — EC-brainpoolP256r1-256 — EC-brainpoolP256t1-256 — EC-brainpoolP384r1-384 — EC-brainpoolP384t1-384 — EC-brainpoolP512r1-512 — EC-brainpoolP512t1-512 |
keyisdeletable | Set if the key will be deletable via the API – boolean, default is false. |
keyisexportable | Set if the new key will be exportable via the API – boolean, default is false. |
keyisversioned | Set if the new key will be a versioned key – boolean, default is false. |
keytemplate | Optional, identify a template to use as a basis for the key generation. |
keyistemplate | Optional, set if generating a template rather than a key – boolean, default is false. |
certAlias | Client certificate alias for making SSL connections (optional). |
certPass | Password for the provided certificate alias (optional). |
Sample REST call for cxf
request
{
"Key_Gen": {
"username": "cryptouser",
"password": "safenet123",
"keyname": "TestKey",
"keyalgorithm": "AES-256",
"keyisdeletable": "false",
"keyisexportable": "false",
"keyisversioned": "false",
"keyistemplate": "true"
}
}
response
{
"KeyGenResponse": {
"keyGenResponse": "true"
}
}
Sample SOAP Parameters
<prot:Key_Gen>
<username>cryptouser</username>
<password>qwerty1234</password>
<keyname>testkey</keyname>
<keyalgorithm>AES-256</keyalgorithm>
<keyisdeletable>true</keyisdeletable>
<keyisexportable>true</keyisexportable>
<keyisversioned>true</keyisversioned>
<!--Optional:-->
<keytemplate></keytemplate>
<!--Optional:-->
<keyistemplate>false</keyistemplate>
</prot:Key_Gen>
Output
boolean – indicates if key creation was successful.
<ns1:Key_GenResponse xmlns:ns1="http://dsws.org/protectappws/">true</ns1:Key_GenResponse>