Search in sources :

Example 1 with SM2Sign

use of org.fisco.bcos.web3j.crypto.gm.sm2.SM2Sign in project web3sdk by FISCO-BCOS.

the class EncryptType method setEncryptInterface.

private static void setEncryptInterface(int encryptType) {
    SignInterface signInterface;
    HashInterface hashInterface;
    if (encryptType == SM2_TYPE) {
        signInterface = new SM2Sign();
        hashInterface = new SM3Digest();
    } else {
        signInterface = new ECDSASign();
        hashInterface = new SHA3Digest();
    }
    Sign.setSignInterface(signInterface);
    Hash.setHashInterface(hashInterface);
}
Also used : SM3Digest(org.fisco.bcos.web3j.crypto.gm.sm3.SM3Digest) SM2Sign(org.fisco.bcos.web3j.crypto.gm.sm2.SM2Sign)

Aggregations

SM2Sign (org.fisco.bcos.web3j.crypto.gm.sm2.SM2Sign)1 SM3Digest (org.fisco.bcos.web3j.crypto.gm.sm3.SM3Digest)1