All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bdware.doipv3.SM3Tool Maven / Gradle / Ivy

The newest version!
package org.bdware.doipv3;

import org.bouncycastle.pqc.math.linearalgebra.ByteUtils;
import org.zz.gmhelper.SM3Util;

public class SM3Tool {
    public static String calculateSM3(String id) {
        byte[] address = SM3Util.hash(id.getBytes());
        String addressInStr = ByteUtils.toHexString(address);
        return addressInStr;
    }
    public static byte[] calculateSM3InBytes(String id) {
        byte[] address = SM3Util.hash(id.getBytes());
        return address;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy