use of net.i2p.data.Signature in project i2p.i2p-bote by i2p.
the class ElGamal2048_DSA1024 method sign.
/**
* Only accepts <code>DSAPrivateKey</code>s.
*/
@Override
public byte[] sign(byte[] data, PrivateKey privateKey, KeyUpdateHandler keyupdateHandler) throws GeneralSecurityException {
DSAPrivateKey dsaKey = castToDSA(privateKey);
Signature signature = DSAEngine.getInstance().sign(data, dsaKey.getI2PKey());
return signature.toByteArray();
}
Aggregations