Search in sources :

Example 1 with SM2PublicKey

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);
}
Also used : SM2PrivateKey(iaik.pkcs.pkcs11.objects.SM2PrivateKey) SM2PublicKey(iaik.pkcs.pkcs11.objects.SM2PublicKey)

Aggregations

SM2PrivateKey (iaik.pkcs.pkcs11.objects.SM2PrivateKey)1 SM2PublicKey (iaik.pkcs.pkcs11.objects.SM2PublicKey)1