package com.izouma.nineth.utils;

import org.bouncycastle.jcajce.provider.digest.Keccak;
import org.bouncycastle.util.encoders.Hex;

import java.nio.charset.StandardCharsets;

public class HashUtils {
    public static String Keccak256(String input) {
        Keccak.Digest256 digest256 = new Keccak.Digest256();
        byte[] hashbytes = digest256.digest(
                input.getBytes(StandardCharsets.UTF_8));
        return new String(Hex.encode(hashbytes));
    }
}
