Class: Ronin::CLI::Commands::Sha512 Private

Inherits:
StringProcessorCommand show all
Defined in:
lib/ronin/cli/commands/sha512.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Calculates SHA512 hashes of data.

Usage

ronin sha512 [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

Since:

  • 2.0.0

Instance Attribute Summary

Attributes inherited from StringProcessorCommand

#input_values

Instance Method Summary collapse

Methods inherited from StringProcessorCommand

#initialize, #print_string, #process_input, #run

Methods inherited from FileProcessorCommand

#open_file, #process_file, #process_input, #run

Constructor Details

This class inherits a constructor from Ronin::CLI::StringProcessorCommand

Instance Method Details

#process_string(string) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Computes a SHA512 checksum for the given String.

Parameters:

  • string (String)

    The input string.

Returns:

  • (String)

    The SHA512 hexdigest of the given String.

Since:

  • 2.0.0



60
61
62
# File 'lib/ronin/cli/commands/sha512.rb', line 60

def process_string(string)
  Digest::SHA512.hexdigest(string)
end