public void verify ( String signatureBaseString , String signature ) throws InvalidSignatureException { if ( this . encoder != null ) { if ( ! this . encoder . isPasswordValid ( this . secret , signature , this . salt ) ) { throw new InvalidSignatureException ( "Invalid signature for signature method " + getName ( ) ) ; } } else if ( ! signature . equals ( this . secret ) ) { throw new InvalidSignatureException ( "Invalid signature for signature method " + getName ( ) ) ; } }
Validates that the signature is the same as the secret .