Module: Rmega::Crypto::Rsa
Instance Method Summary collapse
Instance Method Details
#context ⇒ Object
12 13 14 |
# File 'lib/rmega/crypto/rsa.rb', line 12 def context @context ||= ExecJS.compile File.read(script_path) end |
#decrypt(t, privk) ⇒ Object
16 17 18 |
# File 'lib/rmega/crypto/rsa.rb', line 16 def decrypt(t, privk) context.call "RSAdecrypt", t, privk[2], privk[0], privk[1], privk[3] end |
#script_path ⇒ Object
8 9 10 |
# File 'lib/rmega/crypto/rsa.rb', line 8 def script_path File.join File.dirname(__FILE__), 'rsa_mega.js' end |