Sha256: 666901ce6e5f6856fe53363cb793c948af58e7cad3ff9f094d7b065c4a17ceec

Contents?: true

Size: 347 Bytes

Versions: 1

Compression:

Stored size: 347 Bytes

Contents

module Legacy::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

1 entries across 1 versions & 1 rubygems

Version Path
legacy-fernet-1.6.1 lib/fernet/secret.rb