final byte[] sigBytes = sign(signature, privateKey, message);
final boolean verify = verify(signature, publicKey, message, sigBytes);
if (!verify)
{
throw new ConfigurationException("Checking key pair failed. It seems the public and private key don't" +
" belong to the same key pair. Please check your configuration. We're using the following keys," +
" is that what you expected?\n" +
AC.publicKey.get() + "\n" +
AC.privateKey.get());
}
}
catch (InvalidKeyException | SignatureException e)
{
throw new ConfigurationException("Couldn't check key pair because of the following exception.", e);
}
}