Sha256: f871243a6bc05bbbee77bf7bf84ca3f2690a4cc938d0187719d7047b4621c8f0
Contents?: true
Size: 1.69 KB
Versions: 13
Compression:
Stored size: 1.69 KB
Contents
# frozen_string_literal: true # # Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com) # # Ronin is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ronin is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ronin. If not, see <https://www.gnu.org/licenses/>. # require 'ronin/cli/string_processor_command' require 'digest' module Ronin class CLI module Commands # # Calculates SHA1 hashes of data. # # ## Usage # # ronin sha1 [options] [FILE ...] # # ## Options # # -f, --file FILE Optional file to process # --string STRING Optional string to process # -M, --multiline Process each line separately # -n, --keep-newlines Preserves newlines at the end of each line # -h, --help Print help information # # ## Arguments # # [FILE ...] Optional file(s) to process # class Sha1 < StringProcessorCommand description "Calculates SHA1 hashes of data" man_page 'ronin-sha1.1' def process_string(string) Digest::SHA1.hexdigest(string) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems