Sha256: fcaf9f1a97ce4b0e7c2fe55d6bce34ca5b915b943343cbce26b9c13244d7a15a

Contents?: true

Size: 680 Bytes

Versions: 14

Compression:

Stored size: 680 Bytes

Contents

#!/usr/bin/env bin/rails runner
# frozen_string_literal: true

require "optparse"
require "debug" if ENV.fetch("DEBUG", false)

options = {}
OptionParser.new do |opts|
  opts.banner = "Usage: hmac_text [options]"

  opts.on("-l", "--load PATH", "Load file from path") { |v| options[:load_path] = v }
  opts.on("-p", "--parse STRING", "Parses string directly") { |v| options[:parse_string] = v }
end.parse!

body = if options[:load_path].present?
  File.read(options[:load_path])
elsif options[:parse_string].present?
  options[:parse_string]
end

puts "Parsing `#{body}` into HMAC"
puts OpenSSL::HMAC.hexdigest(Hephaestus::ValidatesFromYetto::SHA256_DIGEST, SIGNING_SECRET, body)

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hephaestus-0.8.17 templates/script/hmac_text
hephaestus-0.8.16.1 templates/script/hmac_text
hephaestus-0.8.16 templates/script/hmac_text
hephaestus-0.8.15.5 templates/script/hmac_text
hephaestus-0.8.15.4 templates/script/hmac_text
hephaestus-0.8.15.3 templates/script/hmac_text
hephaestus-0.8.15.2 templates/script/hmac_text
hephaestus-0.8.15.1 templates/script/hmac_text
hephaestus-0.8.15 templates/script/hmac_text
hephaestus-0.8.14 templates/script/hmac_text
hephaestus-0.8.13 templates/script/hmac_text
hephaestus-0.8.12.2 templates/script/hmac_text
hephaestus-0.8.12.1 templates/script/hmac_text
hephaestus-0.8.12 templates/script/hmac_text