Class RawKeyring

  • All Implemented Interfaces:
    Keyring
    Direct Known Subclasses:
    AesKeyring, RsaKeyring

    public abstract class RawKeyring
    extends S3Keyring
    This is an abstract base class for keyrings that use raw cryptographic keys (AES + RSA)
    • Method Detail

      • modifyMaterialsForRawKeyring

        public EncryptionMaterials modifyMaterialsForRawKeyring​(EncryptionMaterials materials)
        Modifies encryption materials with the keyring's materials description if present. Issues a warning if encryption context is found, as it provides no security benefit for raw keyrings.
        Parameters:
        materials - the encryption materials to modify
        Returns:
        modified encryption materials with the keyring's materials description or original encryption materials if no materials description is set
      • warnIfEncryptionContextIsPresent

        public void warnIfEncryptionContextIsPresent​(EncryptionMaterials materials)
        Checks if an encryption context is present in the EncryptionMaterials and issues a warning if an encryption context is found.

        Encryption context is not recommended for use with non-KMS keyrings as it does not provide additional security benefits and is not stored.

        Parameters:
        materials - EncryptionMaterials