src/main/java/at/favre/tools/dice/service/randomorg/RandomOrgUtil.java
static boolean verifyRSA(PublicKey publicKey, byte[] plainData, byte[] signature) {
        try {
            Signature sig = Signature.getInstance("SHA512withRSA");
            sig.initVerify(publicKey);
            sig.update(plainData);
            return sig.verify(signature);
        } catch (Exception e) {
            throw new IllegalStateException("could not verify", e);
        }
    }
/**
     * Checks the signature based on given pub key and raw data
     *
     * @param publicKey used to verify the signature
     * @param plainData the plain data to verify
     * @param signature as byte array
     * @return true if the signature can be verified with given data
     */
Checks the signature based on given pub key and raw data
@param publicKey used to verify the signature
@param plainData the plain data to verify
@param signature as byte array
@return true if the signature can be verified with given data
Checks the signature based on given pub key and raw data @param publicKey used to verify the signature @param plainData the plain data to verify @param signature as byte array @return true if the signature can be verified with given data
static boolean verifyRSA(PublicKey publicKey, byte[] plainData, byte[] signature) {
        try {
            Signature sig = Signature.getInstance("SHA512withRSA");
            sig.initVerify(publicKey);
            sig.update(plainData);
            return sig.verify(signature);
        } catch (Exception e) {
            throw new IllegalStateException("could not verify", e);
        }
    }
static boolean verifyRSA ( PublicKey publicKey , byte [ ] plainData , byte [ ] signature ) { try { Signature sig = Signature . getInstance ( "SHA512withRSA" ) ; sig . initVerify ( publicKey ) ; sig . update ( plainData ) ; return sig . verify ( signature ) ; } catch ( Exception e ) { throw new IllegalStateException ( "could not verify" , e ) ; } }
Checks the signature based on given pub key and raw data
 @param publicKey used to verify the signature
 @param plainData the plain data to verify
 @param signature as byte array
 @return true if the signature can be verified with given data
Checks the signature based on given pub key and raw data @param publicKey used to verify the signature @param plainData the plain data to verify @param signature as byte array @return true if the signature can be verified with given data