Sha256: b277fdb99de8def70c99e84a28bc03eba3dcc470f3c0eb00c6bf3b77cb271cd7

Contents?: true

Size: 272 Bytes

Versions: 3

Compression:

Stored size: 272 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module FileAuthorizationHandler
    module EncodingHelper
      def encode_id_document(id_document)
        Digest::SHA256.hexdigest("#{id_document}-#{Rails.application.secrets.secret_key_base}")
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-file_authorization_handler-0.27.1.7 spec/helpers/decidim/file_authorization_handler/encoding_helper.rb
decidim-file_authorization_handler-0.27.1.6 spec/helpers/decidim/file_authorization_handler/encoding_helper.rb
decidim-file_authorization_handler-0.27.1.5 spec/helpers/decidim/file_authorization_handler/encoding_helper.rb