interconnect/model/src/main/java/de/taimos/dvalin/interconnect/model/MessageCryptoUtil.java
/**
     * @param msg       the message to validate
     * @param signature the signature hash to check
     * @return validation result
     * @throws CryptoException on sign error
     */
@param msg       the message to validate
@param signature the signature hash to check
@return validation result
@throws CryptoException on sign error
@param msg the message to validate @param signature the signature hash to check @return validation result @throws CryptoException on sign error
public static boolean validate(final String msg, final String signature) throws CryptoException {
        if ((signature == null) || signature.isEmpty()) {
            return false;
        }
        final String calcSig = MessageCryptoUtil.sign(msg);
        return calcSig.equals(signature);
    }
public static boolean validate ( final String msg , final String signature ) throws CryptoException { if ( ( signature == null ) || signature . isEmpty ( ) ) { return false ; } final String calcSig = MessageCryptoUtil . sign ( msg ) ; return calcSig . equals ( signature ) ; }
@param msg       the message to validate
 @param signature the signature hash to check
 @return validation result
 @throws CryptoException on sign error
@param msg the message to validate @param signature the signature hash to check @return validation result @throws CryptoException on sign error