Class AbstractJeapCryptoDataFormat

java.lang.Object
ch.admin.bit.jeap.crypto.internal.core.dataformat.AbstractJeapCryptoDataFormat
All Implemented Interfaces:
JeapCryptoDataFormat
Direct Known Subclasses:
JeapCryptoMultiKeyDataFormat

public abstract class AbstractJeapCryptoDataFormat extends Object implements JeapCryptoDataFormat
  • Field Details

  • Constructor Details

    • AbstractJeapCryptoDataFormat

      public AbstractJeapCryptoDataFormat()
  • Method Details

    • format

      public final byte[] format(JeapCryptoContainer cryptoContainer)
      Specified by:
      format in interface JeapCryptoDataFormat
    • formatToByteBuffer

      protected abstract ByteBuffer formatToByteBuffer(JeapCryptoContainer cryptoContainer)
    • assertBufferHasNoRemainingBytes

      protected static void assertBufferHasNoRemainingBytes(ByteBuffer byteBuffer)
    • getNonce

      protected static byte[] getNonce(ByteBuffer byteBuffer)
    • getEncryptedDataKey

      protected static byte[] getEncryptedDataKey(ByteBuffer byteBuffer)
    • getCiphertext

      protected static byte[] getCiphertext(ByteBuffer byteBuffer)
    • assertCiphertextNotEmpty

      protected static void assertCiphertextNotEmpty(int ciphertextLength)
    • assertFieldLength

      protected static void assertFieldLength(byte[] bytes, int expectedLength, String fieldName)