public enum ContentType extends Enum<ContentType>
The single block format stores the encrypted content in a single block wrapped with headers containing the nonce, MAC tag, and the content length.
The frame format partitions the encrypted content in multiple frames of a specified frame length. Each frame is wrapped by an header containing the frame sequence number, nonce, and the MAC tag.
Format: ContentType(byte value representing the type)
Enum Constant and Description |
---|
FRAME |
SINGLEBLOCK |
Modifier and Type | Method and Description |
---|---|
static ContentType |
deserialize(byte value)
Deserialize the provided byte value by returning the ContentType object representing the byte
value.
|
byte |
getValue()
Return the value used to encode this content type object in the ciphertext.
|
static ContentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ContentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContentType SINGLEBLOCK
public static final ContentType FRAME
public static ContentType[] values()
for (ContentType c : ContentType.values()) System.out.println(c);
public static ContentType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic byte getValue()
public static ContentType deserialize(byte value)
value
- the byte representing the value of the ContentType object.Copyright © 2023. All rights reserved.