Interface CryptoKeyReader

All Superinterfaces:
Serializable

@Public @Stable public interface CryptoKeyReader extends Serializable
Interface that abstracts the access to a key store.
  • Method Details

    • getPublicKey

      EncryptionKeyInfo getPublicKey(String keyName, Map<String,String> metadata)
      Return the encryption key corresponding to the key name in the argument.

      This method should be implemented to return the EncryptionKeyInfo. This method will be called at the time of producer creation as well as consumer receiving messages. Hence, application should not make any blocking calls within the implementation.

      Parameters:
      keyName - Unique name to identify the key
      metadata - Additional information needed to identify the key
      Returns:
      EncryptionKeyInfo with details about the public key
    • getPrivateKey

      EncryptionKeyInfo getPrivateKey(String keyName, Map<String,String> metadata)
      Parameters:
      keyName - Unique name to identify the key
      metadata - Additional information needed to identify the key
      Returns:
      byte array of the private key value