Module: Veriff::Security
- Included in:
- Veriff
- Defined in:
- lib/veriff/security.rb
Instance Method Summary collapse
Instance Method Details
#generate_signature(options) ⇒ Object
5 6 7 8 9 |
# File 'lib/veriff/security.rb', line 5 def generate_signature() Digest::SHA256.hexdigest( "#{[:signature] || [:body]}#{configuration.api_secret}" ) end |
#validate_signature(body, signature) ⇒ Object
11 12 13 |
# File 'lib/veriff/security.rb', line 11 def validate_signature(body, signature) generate_signature(body: body) == signature end |