- java.lang.Object
-
- io.github.mmm.binary.BinaryType
-
- io.github.mmm.crypto.CryptoBinary
-
- io.github.mmm.crypto.crypt.EncryptedData
-
- All Implemented Interfaces:
Binary,Streamable
public class EncryptedData extends CryptoBinary
Simple datatype as container for aencrypted data.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Field Summary
-
Fields inherited from class io.github.mmm.binary.BinaryType
data
-
Fields inherited from interface io.github.mmm.binary.Binary
EMPTY_BYTE_ARRAY
-
-
Constructor Summary
Constructors Constructor Description EncryptedData(byte[] data)The constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EncryptedDataof(byte[] hash)static EncryptedDataofBase64(String base64)static EncryptedDataofHex(String hex)-
Methods inherited from class io.github.mmm.binary.BinaryType
asStream, equals, format, formatBase64, formatHex, getData, getData, getDataByte, getLength, getMaxLength, getMinLength, hashCode, isZeros, parseBase64, parseHex, save, toBytes, toBytes, toInt, toLong, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.binary.Binary
formatBase64, formatHex
-
-
-
-
Constructor Detail
-
EncryptedData
public EncryptedData(byte[] data)
The constructor.- Parameters:
data- the raw binarydata.
-
-
Method Detail
-
of
public static EncryptedData of(byte[] hash)
- Parameters:
hash- the raw representation.- Returns:
- the parsed
EncryptedDataornullin casehashwasnull.
-
ofBase64
public static EncryptedData ofBase64(String base64)
- Parameters:
base64- thedataasbase64.- Returns:
- the parsed
EncryptedDataornullin casebase64wasnull.
-
ofHex
public static EncryptedData ofHex(String hex)
- Parameters:
hex- thedataashex.- Returns:
- the parsed
EncryptedDataornullin casebase64wasnull.
-
-