Module: JOSE::JWE::ALG

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

Class Method Summary collapse

Class Method Details

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

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

Parameters:

  • parameters (Array)
  • algorithm (String)
  • encryption (String)

Returns:

See Also:



10
11
12
13
14
15
16
# File 'lib/jose/jwe/alg.rb', line 10

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