- 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 EncryptedData
of(byte[] hash)
static EncryptedData
ofBase64(String base64)
static EncryptedData
ofHex(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
EncryptedData
ornull
in casehash
wasnull
.
-
ofBase64
public static EncryptedData ofBase64(String base64)
- Parameters:
base64
- thedata
asbase64
.- Returns:
- the parsed
EncryptedData
ornull
in casebase64
wasnull
.
-
ofHex
public static EncryptedData ofHex(String hex)
- Parameters:
hex
- thedata
ashex
.- Returns:
- the parsed
EncryptedData
ornull
in casebase64
wasnull
.
-
-