class Argon2::Engine

def self.argon2_verify(pwd, hash, secret)

def self.argon2_verify(pwd, hash, secret)
  secretlen = secret.nil? ? 0 : secret.bytesize
  passwordlen = pwd.nil? ? 0 : pwd.bytesize
  ret = Ext.wrap_argon2_verify(hash, pwd, passwordlen, secret, secretlen)
  return false if ERRORS[ret.abs] == 'ARGON2_DECODING_FAIL'
  raise ArgonHashFail, ERRORS[ret.abs] unless ret.zero?
  true
end