Class EncryptionMaterials

    • Method Detail

      • getAlgorithm

        public CryptoAlgorithm getAlgorithm()
        The algorithm to use for this encryption operation. Must match the algorithm in EncryptionMaterialsRequest, if that algorithm was non-null.
      • getEncryptionContext

        public Map<String,​String> getEncryptionContext()
        The encryption context to use for the encryption operation. Does not need to match the EncryptionMaterialsRequest.
      • getEncryptedDataKeys

        public List<KeyBlob> getEncryptedDataKeys()
        The KeyBlobs to serialize (in cleartext) into the encrypted message.
      • getCleartextDataKey

        public SecretKey getCleartextDataKey()
        The cleartext data key to use for encrypting this message. Note that this is the data key prior to any key derivation required by the crypto algorithm in use.
      • getTrailingSignatureKey

        public PrivateKey getTrailingSignatureKey()
        The private key to be used to sign the message trailer. Must be present if any only if required by the crypto algorithm, and the key type must likewise match the algorithm in use. Note that it's the CryptoMaterialsManager's responsibility to find a place to put the public key; typically, this will be in the encryption context, to improve cross-compatibility, but this is not a strict requirement.
      • getMasterKeys

        public List<MasterKey> getMasterKeys()
        Contains a list of all MasterKeys that could decrypt this message.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object