Package org.drasyl.crypto
Class Hashing
- java.lang.Object
-
- org.drasyl.crypto.Hashing
-
public final class Hashing extends Object
Util class that provides hashing functions for drasyl.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
sha256(byte[]... input)
Generates a SHA-256 hash of the given input.static byte[]
sha256(String input)
Generates a SHA-256 hash of the given input.
-
-
-
Method Detail
-
sha256
public static byte[] sha256(String input)
Generates a SHA-256 hash of the given input.- Parameters:
input
- the input to hash- Returns:
- SHA-256 hash of the input
- Throws:
IllegalArgumentException
- if SHA-256 hash could not be created
-
sha256
public static byte[] sha256(byte[]... input)
Generates a SHA-256 hash of the given input.- Parameters:
input
- the input to hash- Returns:
- SHA-256 hash of the input
- Throws:
IllegalArgumentException
- if SHA-256 hash could not be created
-
-