Sha256: 616077d4b3fa7ac5aae3b1c2bcfa39db4c4fb8428e5d57db9c9c17083ab680ec

Contents?: true

Size: 401 Bytes

Versions: 24

Compression:

Stored size: 401 Bytes

Contents

module Bixby
  class EncryptedJsonRequest < JsonRequest

    def initialize(json_request, private_key, public_key, uuid="master")
      self.operation = json_request.operation
      self.params = json_request.params

      # encrypt
      data = json_request.to_json
      @body = Bixby::CryptoUtil.encrypt(data, uuid, public_key, private_key)
    end

    def to_wire
      @body
    end

  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
bixby-common-0.7.1 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.7.0 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.6.6 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.6.5 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.6.4 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.6.3 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.6.2 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.6.1 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.6.0 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.5.0 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.13 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.12 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.11 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.10 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.9 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.8 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.7 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.6 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.5 lib/bixby-common/api/encrypted_json_request.rb
bixby-common-0.4.4 lib/bixby-common/api/encrypted_json_request.rb