Creating a CipherSpec for a versioned key
To create a CipherSpec for a versioned key
Call the I_C_CreateCipherSpec
API to create a CipherSpec that uses the latest active version of the key or a specific version of a key. When no version is specified, the API uses the latest active version. When a specific version is appended (#n), that version is used.
Example
rc = I_C_CreateCipherSpec(algorithm, my_version_key, &cipherspec);
rc = I_C_CreateCipherSpec(algorithm, "my_version_key#4", &cipherspec);
Note
It is not recommended to share CipherSpec in threads. Each thread should have different CipherSpec.