Sha256: e0c81a0995d789c23fccd463cdd2f063a322da81d952fa0d23b105cfc78bf069

Contents?: true

Size: 330 Bytes

Versions: 15

Compression:

Stored size: 330 Bytes

Contents

module Auther
  class Cipher
    def initialize secret
      @encryptor = ActiveSupport::MessageEncryptor.new secret
    end

    def encrypt data
      encryptor.encrypt_and_sign data
    end

    def decrypt data
      encryptor.decrypt_and_verify data
    end

    private

    def encryptor
      @encryptor
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
auther-4.1.0 lib/auther/cipher.rb
auther-4.0.0 lib/auther/cipher.rb
auther-3.2.0 lib/auther/cipher.rb
auther-3.1.0 lib/auther/cipher.rb
auther-3.0.0 lib/auther/cipher.rb
auther-2.2.0 lib/auther/cipher.rb
auther-2.1.0 lib/auther/cipher.rb
auther-2.0.0 lib/auther/cipher.rb
auther-1.4.0 lib/auther/cipher.rb
auther-1.3.0 lib/auther/cipher.rb
auther-1.2.0 lib/auther/cipher.rb
auther-1.1.0 lib/auther/cipher.rb
auther-1.0.0 lib/auther/cipher.rb
auther-0.3.0 lib/auther/cipher.rb
auther-0.2.0 lib/auther/cipher.rb