Alternative Method to Get an Instance of a Key Object
To get an instance of an AES key:
Create an
NaeKeyManagement
object.NaeKeyManagement nkm = new NaeKeyManagement(session);
Call the
GetKey
method of this object and pass the key name as an argument.NaeRijndaelKey key = (NaeRijndaelKey)nkm.GetKey(keyName);
The operation will fail and throw an exception, if:
The
keyName
passed does not match an actual key on the CipherTrust Manager server.Key name matches but the type of the key is different on the CipherTrust Manager server.
Similarly, you can get an instance for DESede, RSA, EC, and HMAC keys.