Closed xmlking closed 2 years ago
Hi @xmlking sorry for not replying earlier. One way to do so is for example in C++ using the KeysetManager
API; to use a key with ID keyId
:
KeysetManager::SetKeyId(keyId)
KeysetManager::GetKeysetHandle()
KeysetHandle::GetPrimitive()
The wrapped primitive (in this case AeadSetWrapper
) will encrypt with the primary key, and decrypt with the key whose ID is set as a prefix of the ciphertext.
I am going to close this issue. Feel free to reopen it if you have further questions!
if I have a multiple active keys in a keyset, how do I specify which KeyId I want to use to encrypt using Aead API?