code: 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());
      }
    }
docs: Validates that the signature is the same as the secret.
  
  @param signatureBaseString The signature base string (unimportant, ignored).
  @param signature           The signature.
  @throws InvalidSignatureException If the signature is not the same as the secret.