sandal
sandal copied to clipboard
uninitialized constant Sandal::Enc::AGCM::SecureRandom
Following your example, and generating the keys as you specified, I get this error:
alg = Sandal::Enc::Alg::RSA_OAEP.new(File.read('rsa_public_key.pem'))
encrypter = Sandal::Enc::A128GCM.new(alg)
jwe_token = Sandal.encrypt_token(jws_token, encrypter, {
'kid': 'your rsa key',
'cty': 'JWT'
})
NameError: uninitialized constant Sandal::Enc::AGCM::SecureRandom
from /Users/tilo/.rvm/gems/ruby-2.2.2/gems/sandal-0.6.0/lib/sandal/enc/agcm.rb:41:in `encrypt'
from /Users/tilo/.rvm/gems/ruby-2.2.2/gems/sandal-0.6.0/lib/sandal.rb:143:in `encrypt_token'
from (irb):25
from /Users/tilo/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `<main>'
@gregbeech any idea what's wrong?