Class: Sandal::Sig::HS256

Inherits:
HS
  • Object
show all
Defined in:
lib/sandal/sig/hs.rb

Overview

The HMAC-SHA256 signing algorithm.

Constant Summary collapse

NAME =

The JWA name of the algorithm.

"HS256"

Instance Attribute Summary

Attributes inherited from HS

#name

Instance Method Summary collapse

Methods inherited from HS

#sign, #valid?

Constructor Details

#initialize(key) ⇒ HS256

Creates a new instance.

Parameters:

  • key (String)

    The key to use for signing or validation.



52
53
54
# File 'lib/sandal/sig/hs.rb', line 52

def initialize(key)
  super(NAME, 256, key)
end