Module: JOSE::JWS::ALG

Defined in:
lib/jose/jws/alg.rb

Class Method Summary collapse

Class Method Details

.generate_key(parameters, algorithm) ⇒ JOSE::JWK

Generates a new JOSE::JWK based on the parameters and algorithm.

Parameters:

  • parameters (Array)
  • algorithm (String)

Returns:

See Also:



9
10
11
12
13
14
# File 'lib/jose/jws/alg.rb', line 9

def self.generate_key(parameters, algorithm)
  return JOSE::JWK.generate_key(parameters).merge({
    'alg' => algorithm,
    'use' => 'sig'
  })
end