com.syntifi.crypto.key.encdec.Hex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of casper-java-sdk Show documentation
Show all versions of casper-java-sdk Show documentation
SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.
The newest version!
package com.syntifi.crypto.key.encdec;
/**
* Hex encoder/decoder
*
* @author Alexandre Carvalho
* @author Andre Bertolace
* @since 0.3.0
*/
public class Hex {
/**
* Byte array encoder
*
* @param bytes byte array
* @return Hex String
*/
public static String encode(byte[] bytes) {
return org.bouncycastle.util.encoders.Hex.toHexString(bytes);
}
/**
* Hex string decoder
*
* @param hex Hex string
* @return byte array
*/
public static byte[] decode(String hex) {
return org.bouncycastle.util.encoders.Hex.decode(hex);
}
}