com.vaadin.flow.internal.
Class MessageDigestUtil
Utility class for common MessageDigest
operations.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
Author:
Vaadin Ltd
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Calculates the SHA-256 hash of the UTF-16 representation of the given string.
static byte[]
Calculates the SHA-256 hash of the given string with the given salt representation using the supplied charset.
static byte[]
Calculates the SHA-256 hash of the given string representation using the supplied charset.
-
Method Details
-
sha256
Calculates the SHA-256 hash of the UTF-16 representation of the given string.
Parameters:
string
- the string to hashReturns:
32 bytes making up the hash
-
sha256
Calculates the SHA-256 hash of the given string representation using the supplied charset.
Parameters:
string
- the string to hashReturns:
32 bytes making up the hash
-
sha256
Calculates the SHA-256 hash of the given string with the given salt representation using the supplied charset.
Parameters:
string
- the string to hashsalt
- salt to be added into hash calculationReturns:
32 bytes making up the hash
-