Package anbxj

Class Crypto_SealedObject

java.lang.Object
anbxj.Crypto_SealedObject
All Implemented Interfaces:
Serializable

public class Crypto_SealedObject extends Object implements Serializable
Universal sealed (encrypted) container for both symmetric and hybrid encryption.

Internally the encrypted key, encrypted message and cipher scheme are stored as raw byte arrays - a format suitable for both Java serialisation and Protocol Buffers.

See Also:
  • Constructor Details

    • Crypto_SealedObject

      public Crypto_SealedObject(byte[] encryptedKey, byte[] encryptedMessage, String cipherScheme)
      Constructs a new Crypto_SealedObject from raw fields.
      Parameters:
      encryptedKey - the encrypted symmetric key (may be null if no key transport is used)
      encryptedMessage - the encrypted message payload (must not be null)
      cipherScheme - the cipher scheme used (e.g. "AES/GCM/NoPadding")
      Throws:
      NullPointerException - if encryptedMessage or cipherScheme is null
  • Method Details