public final class CompoundHashData extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CompoundHashData.Config |
| Modifier and Type | Field and Description |
|---|---|
List<CompoundHashData.Config> |
configList |
byte[] |
rawHash |
byte[] |
rawSalt |
| Constructor and Description |
|---|
CompoundHashData(List<CompoundHashData.Config> configList,
byte[] rawSalt,
byte[] rawHash) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static CompoundHashData |
from(HashData hashData)
Convert normal hash data to compound format
|
byte[] |
getAsBlobMessageFormat()
Create the serialized message in raw byte array / blob format.
|
String |
getAsEncodedMessageFormat()
Similar to
getAsBlobMessageFormat() but returns as Base64 url-encoded string |
int |
hashCode() |
static CompoundHashData |
parse(byte[] rawHashMessage)
Parse given raw blob hash message in compound format and returns this data model.
|
static CompoundHashData |
parse(String base64BkdfCompoundHashMsg)
Parse given base64 hash message in compound format and returns this data model.
|
void |
wipe()
Wipes salt and hash internally.
|
public final List<CompoundHashData.Config> configList
public final byte[] rawSalt
public final byte[] rawHash
public CompoundHashData(List<CompoundHashData.Config> configList, byte[] rawSalt, byte[] rawHash)
public static CompoundHashData from(HashData hashData)
hashData - to convertpublic static CompoundHashData parse(String base64BkdfCompoundHashMsg)
base64BkdfCompoundHashMsg - base64-url encoded msg, see getAsEncodedMessageFormat()public static CompoundHashData parse(byte[] rawHashMessage)
rawHashMessage - to parseVersion.UnsupportedBkdfVersionException - if version identifier is not compound typepublic void wipe()
public byte[] getAsBlobMessageFormat()
The format is
V L CC CC CC CC ... SSSSSSSSSSSSSSSS HHHHHHHHHHHHHHHH
public String getAsEncodedMessageFormat()
getAsBlobMessageFormat() but returns as Base64 url-encoded stringCopyright © 2018. All rights reserved.