Module: JOSE::JWE::ALG

Extended by:
ALG
Included in:
ALG
Defined in:
lib/jose/jwe/alg.rb

Instance Method Summary collapse

Instance Method Details

#generate_key(parameters, algorithm, encryption) ⇒ Object


5
6
7
8
9
10
11
# File 'lib/jose/jwe/alg.rb', line 5

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