INNER CODE UNIT · Java

toHex

terl/lazysodium-java · src/main/java/com/goterl/lazysodium/LazySodium.java:110

    public static String toHex(byte[] bin) {
        return bytesToHex(bin);
    }


    /**
     * Hexadecimal string to bytes. Equivalent to {@link #sodiumHex2Bin(String)}} but static.
     *
     * @param hex Hexadecimal string to convert to bytes.
     * @return Byte array.
     */
    public static byte[] toBin(String hex) {
        return hexToBytes(hex);
    }


    private static final char[] hexArray = "0123456789ABCDEF".toCharArray();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…