public ECDSASignature sign Sha256Hash input Nullable KeyParameter aesK

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
public ECDSASignature sign(Sha256Hash input, @Nullable KeyParameter aesKey) throws KeyCrypterException {
KeyCrypter crypter = getKeyCrypter();
if (crypter != null) {
if (aesKey == null)
throw new KeyIsEncryptedException();
return decrypt(aesKey).sign(input);
} else {
// No decryption of private key required.
if (priv == null)
throw new MissingPrivateKeyException();
}
return doSign(input, priv);
}