Class AbstractJeapCryptoDataFormat
java.lang.Object
ch.admin.bit.jeap.crypto.internal.core.dataformat.AbstractJeapCryptoDataFormat
- All Implemented Interfaces:
JeapCryptoDataFormat
- Direct Known Subclasses:
JeapCryptoMultiKeyDataFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidassertBufferHasNoRemainingBytes(ByteBuffer byteBuffer) protected static voidassertCiphertextNotEmpty(int ciphertextLength) protected static voidassertFieldLength(byte[] bytes, int expectedLength, String fieldName) final byte[]format(JeapCryptoContainer cryptoContainer) protected abstract ByteBufferformatToByteBuffer(JeapCryptoContainer cryptoContainer) protected static byte[]getCiphertext(ByteBuffer byteBuffer) protected static byte[]getEncryptedDataKey(ByteBuffer byteBuffer) protected static byte[]getNonce(ByteBuffer byteBuffer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.admin.bit.jeap.crypto.internal.core.dataformat.JeapCryptoDataFormat
canParse, parse
-
Field Details
-
NONCE_FIELD_LENGTH
protected static final int NONCE_FIELD_LENGTH- See Also:
-
DATA_KEY_FIELD_LENGTH
protected static final int DATA_KEY_FIELD_LENGTH- See Also:
-
-
Constructor Details
-
AbstractJeapCryptoDataFormat
public AbstractJeapCryptoDataFormat()
-
-
Method Details
-
format
- Specified by:
formatin interfaceJeapCryptoDataFormat
-
formatToByteBuffer
-
assertBufferHasNoRemainingBytes
-
getNonce
-
getEncryptedDataKey
-
getCiphertext
-
assertCiphertextNotEmpty
protected static void assertCiphertextNotEmpty(int ciphertextLength) -
assertFieldLength
-