Sha256: 474e9abe84bb8298691d78dff3b2b76406eab2a01c940c80e53fce8b045bebfb

Contents?: true

Size: 339 Bytes

Versions: 7

Compression:

Stored size: 339 Bytes

Contents

module Fernet
  class Secret
    def initialize(secret, encrypt)
      @secret  = secret
      @encrypt = encrypt
    end

    def encryption_key
      @secret.slice(@secret.size/2, @secret.size)
    end

    def signing_key
      if @encrypt
        @secret.slice(0, @secret.size/2)
      else
        @secret
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fernet_multi_json-1.6 lib/fernet/secret.rb
fernet-1.6 lib/fernet/secret.rb
fernet-1.5 lib/fernet/secret.rb
fernet-1.4 lib/fernet/secret.rb
fernet-1.3 lib/fernet/secret.rb
fernet-1.2 lib/fernet/secret.rb
fernet-1.1 lib/fernet/secret.rb