Example usage for org.bouncycastle.crypto SignerWithRecovery init

List of usage examples for org.bouncycastle.crypto SignerWithRecovery init

Introduction

In this page you can find the example usage for org.bouncycastle.crypto SignerWithRecovery init.

Prototype

public void init(boolean forSigning, CipherParameters param);

Source Link

Document

Initialise the signer for signing or verification.

Usage

From source file:org.irmacard.mno.common.EDlData.java

@Override
protected SignerWithRecovery getRSASigner() {
    SignerWithRecovery signer = null;
    try {//  w  ww.ja  v  a2  s.c  om
        RSAEngine rsa = new RSAEngine();
        RSAPublicKey pub = (RSAPublicKey) getPublicKey(aaFile);
        RSAKeyParameters pubParameters = new RSAKeyParameters(false, pub.getModulus(), pub.getPublicExponent());
        signer = new ISO9796d2Signer(rsa, new SHA256Digest(), false);
        signer.init(false, pubParameters);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return signer;
}