Class Util
java.lang.Object
net.finmath.smartcontracts.representablestate.xml.util.Util
Utilities related to encryption/decryption/hashing
- Author:
- Christian Fries
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetBase64(byte[] bytes) Get a Base64 representation of the byte-array.static StringgetHex(byte[] bytes) Get a Hex representation of the byte-array.static StringgetHexTrimmed(byte[] bytes) Get the first hex values of the byte-array (e.g. for logging).static StringgetHexTrimmed(byte[] bytes, int len) Get the first hex values of the byte-array (e.g. for logging).
-
Method Details
-
getHex
Get a Hex representation of the byte-array.- Parameters:
bytes- an array of byte- Returns:
- a
Stringobject representing the byte array in hex.
-
getHexTrimmed
Get the first hex values of the byte-array (e.g. for logging).- Parameters:
bytes- an array of byte- Returns:
- a
Stringobject representing the byte array in base64.
-
getHexTrimmed
Get the first hex values of the byte-array (e.g. for logging).- Parameters:
bytes- an array of bytelen- the length to represent- Returns:
- a
Stringobject with starting hex encodings of the byte array.
-
getBase64
Get a Base64 representation of the byte-array.- Parameters:
bytes- an array of byte- Returns:
- a
Stringobject
-