pub fn decrypt_with_key(
key_id: &str,
ciphertext: &str,
associated_data: Option<&[u8]>,
) -> Result<String>Expand description
Decrypt text using a stored key from the key store
§Arguments
key_id- Identifier of the key to use for decryptionciphertext- Base64-encoded encrypted text to decryptassociated_data- Optional associated data (must match encryption)
§Returns
Decrypted plaintext as a string
§Errors
Returns an error if the key store is not initialized, the key is not found, or decryption fails