Sha256: bec7f0933f56e199cffc8848d9197e922cf4175c969101fb76035d04b9889029

Contents?: true

Size: 321 Bytes

Versions: 17

Compression:

Stored size: 321 Bytes

Contents

require 'mongoid/kms'
require 'rot13'

module Mongoid
  module Kms
    module ClassMethods
      def encrypt_field(object, field_name, value)
        Rot13.rotate(value, 13)
      end

      def decrypt_field(object, field_name, data, encryption_context = nil)
        Rot13.rotate(data, -13)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mongoid-kms-0.1.2 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.34 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.33 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.32 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.31 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.30 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.29 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.28 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.27 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.26 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.25 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.24 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.23 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.22 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.21 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.20 lib/mongoid/kms/mock.rb
mongoid-kms-0.0.19 lib/mongoid/kms/mock.rb