Sha256: e053fd823c48bc83f1fab821727e3a2df7b45cf9530304a1ae9d625a73069c3f

Contents?: true

Size: 372 Bytes

Versions: 5

Compression:

Stored size: 372 Bytes

Contents

module Rmega
  module Crypto
    module Rsa
      extend self

      def script_path
        File.join File.dirname(__FILE__), 'rsa_mega.js'
      end

      def context
        @context ||= ExecJS.compile File.read(script_path)
      end

      def decrypt t, privk
        context.call "RSAdecrypt", t, privk[2], privk[0], privk[1], privk[3]
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rmega-0.0.6 lib/rmega/crypto/rsa.rb
rmega-0.0.5 lib/rmega/crypto/rsa.rb
rmega-0.0.4 lib/rmega/crypto/rsa.rb
rmega-0.0.3 lib/rmega/crypto/rsa.rb
rmega-0.0.2 lib/rmega/crypto/rsa.rb