use of iaik.pkcs.pkcs11.objects.SM2PublicKey in project xipki by xipki.
the class IaikP11Slot method generateSM2Keypair0.
@Override
protected P11Identity generateSM2Keypair0(String label, P11NewKeyControl control) throws P11TokenException {
long mech = PKCS11Constants.CKM_VENDOR_SM2_KEY_PAIR_GEN;
assertMechanismSupported(mech);
SM2PrivateKey privateKey = new SM2PrivateKey();
SM2PublicKey publicKey = new SM2PublicKey();
setKeyAttributes(label, PKCS11Constants.CKK_VENDOR_SM2, control, publicKey, privateKey);
return generateKeyPair(mech, privateKey, publicKey);
}
Aggregations