edu.vt.middleware.crypt.digest
Class DigestCli

java.lang.Object
  extended by edu.vt.middleware.crypt.AbstractCli
      extended by edu.vt.middleware.crypt.digest.DigestCli

public class DigestCli
extends AbstractCli

Command line interface for digest operations.

Version:
$Revision: 2745 $
Author:
Middleware Services

Field Summary
protected static String OPT_ALG
          Digest algorithm option.
protected static String OPT_ENCODING
          Output encoding format.
protected static String OPT_SALT
          Salt for digest initialization.
 
Fields inherited from class edu.vt.middleware.crypt.AbstractCli
BASE_64_ENCODING, HEX_ENCODING, OPT_EXAMPLE, OPT_INFILE, options, PEM_SUFFIX
 
Constructor Summary
DigestCli()
           
 
Method Summary
protected  void digest(org.apache.commons.cli.CommandLine line)
          Compute a digest of a data stream from options defined on command line.
protected  void dispatch(org.apache.commons.cli.CommandLine line)
          Dispatch command line data to the handler that can perform the operation requested on the command line.
protected  String getCommandName()
          Gets the name of the command for which this class provides a CLI interface.
protected  void initOptions()
          Initialize CLI options.
static void main(String[] args)
          CLI entry point method.
 
Methods inherited from class edu.vt.middleware.crypt.AbstractCli
closeStream, closeStream, getInputStream, getInputStream, performAction, printExamples, printHelp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPT_ALG

protected static final String OPT_ALG
Digest algorithm option.

See Also:
Constant Field Values

OPT_SALT

protected static final String OPT_SALT
Salt for digest initialization.

See Also:
Constant Field Values

OPT_ENCODING

protected static final String OPT_ENCODING
Output encoding format.

See Also:
Constant Field Values
Constructor Detail

DigestCli

public DigestCli()
Method Detail

main

public static void main(String[] args)
CLI entry point method.

Parameters:
args - Command line arguments.

initOptions

protected void initOptions()
Initialize CLI options.

Overrides:
initOptions in class AbstractCli

dispatch

protected void dispatch(org.apache.commons.cli.CommandLine line)
                 throws Exception
Dispatch command line data to the handler that can perform the operation requested on the command line.

Specified by:
dispatch in class AbstractCli
Parameters:
line - Parsed command line arguments container.
Throws:
Exception - On errors thrown by handler.

digest

protected void digest(org.apache.commons.cli.CommandLine line)
               throws Exception
Compute a digest of a data stream from options defined on command line.

Parameters:
line - Command line argument container.
Throws:
Exception - On digest errors.

getCommandName

protected String getCommandName()
Gets the name of the command for which this class provides a CLI interface.

Specified by:
getCommandName in class AbstractCli
Returns:
Name of CLI command.


Copyright © 2003-2013 Virginia Tech. All Rights Reserved.