de.frame4j
Class MakeDigest

java.lang.Object
  extended by de.frame4j.util.App
      extended by de.frame4j.MakeDigest
All Implemented Interfaces:
AttrSettable, TextHelper.MessageComponents, UIInfo, ActionListener, EventListener, DynamicMBean

@MinDoc(copyright="Copyright 2010  A. Weinert",
        author="Albrecht Weinert",
        version="V.21",
        lastModified="12.02.2010",
        lastModifiedBy="A. Weinert",
        usage="start as Java application (-? for help)",
        purpose="generate a digest for a given text")
public class MakeDigest
extends App

Generate a digest (default MD5) for a given text.

This Java application make a digest for a text given as


The digest algorithms available are those of the Java 6 platform. At the time of this writing those were MD2, MD5 (default) and SHA-1,
Hint: To this application MakeDigest (source) belongs a .properties file MakeDigest.properties that may be considered as part of the documentation and may answer open questions.



Copyright 2010   Albrecht Weinert

See Also:
App

Field Summary
 String alg
          Type of the digest algorithm.
 boolean hiddenEntry
          Use hidden (password) as text.
 String inEncoding
          The input's (text file) encoding.
 String input
          The input text (or file name).
 boolean inputIsFile
          The input is a file name.
protected  ProxyProps proxyProps
          The proxy settings.
 boolean singleQuote
          Surround the digest by single quotes.
 
Fields inherited from class de.frame4j.util.App
ano, appBase, appIO, appStartTime, args, bgColor, err, fullClassName, help, icon, INIT_ERROR, jmxRemoteNote, JOB_DONE_OK, log, LOG_OUT_ERROR, MAIN_THREAD_EXC, mainThread, myClass, myFrame, name, NO_PARS_ERROR, objectName, out, outMode, packName, prop, retCode, runFlag, shortClassName, title, verbose, verbosity
 
Fields inherited from interface de.frame4j.net.AttrSettable
ILLEGAL_TYPE, ILLEGAL_VALUE, NO_ATTRIBUTE, NO_KNOWN_ATTRIBUTE, NO_VALUE, OK
 
Constructor Summary
MakeDigest()
           
 
Method Summary
 int doIt()
          Working method of MakeDigest.
static void main(String[] args)
          Start method of MakeDigest.
 
Methods inherited from class de.frame4j.util.App
actionPerformed, allowNoPropertiesFile, clientOrder, condHelpLog, connect, errMeld, errMeld, errorExit, errorExit, errorExit, errorText, formMessage, formMessage, getAbout, getAboutText, getActTime, getAppLogger, getAppStartTime, getArgs, getAttribute, getAttributes, getAuthor, getCopyright, getDbLogger, getExecTimeMs, getExecTimeString, getHelp, getHelpText, getIcon, getLanguage, getLogHandler, getMBeanInfo, getMessageComponent, getMessageComponentsLength, getMyFrame, getName, getNameWithVersDate, getOutMode, getProp, getPurpose, getStartTime, getStateString, getTitle, getUsage, getVerbosity, getVerbosityString, getVersDate, getXMLinput, go, go, go, haveIcon, invoke, isDebug, isHelp, isHelpLog, isNormal, isRunFlag, isSilent, isTest, isVerbose, logVerbose, logVerbose, makeDbLogger, makeMenuBar, makeMenuBar, makeStatusTextEnd, makeStatusTextStart, messageFormat, normalExit, parsePartial, performeAction, postDeregister, postRegister, preRegister, queueAction, registerAsMBean, setAboutText, setAttribute, setAttribute, setAttribute, setAttributes, setAuthor, setBgColor, setCodePages, setCopyright, setHelp, setJmxRemoteNote, setLogOut2, setName, setOutMode, setOutMode, setPurpose, setTitle, setUsage, setVerbose, setVerbose, setVerbosity, setVerbosity, setVerbosityString, setVersDate, stop, threeLineEndMsg, toString, twoLineEndMsg, twoLineStartMsg, valueLang, valueLang, wakeMainThread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alg

public String alg
Type of the digest algorithm.

It must denote an algorithm the java platform provides a factory for.

Possible values (as of mid2010): MD2 MD5 SHA-1
default: MD5


input

public String input
The input text (or file name).

default: null


inputIsFile

public boolean inputIsFile
The input is a file name.

default: false


inEncoding

public String inEncoding
The input's (text file) encoding.

Default: no encoding / binary


hiddenEntry

public boolean hiddenEntry
Use hidden (password) as text.

default: false


singleQuote

public boolean singleQuote
Surround the digest by single quotes.

default: false


proxyProps

protected ProxyProps proxyProps
The proxy settings.

Constructor Detail

MakeDigest

public MakeDigest()
Method Detail

main

public static void main(String[] args)
Start method of MakeDigest.

The application end with exit-code 0 on success. Exit-code > 0 means abort due to a problem.

Parameters:
args - command line parameter
Execute: MakeDigest [options]

doIt

public int doIt()
Working method of MakeDigest.

Specified by:
doIt in class App
Returns:
> 0: error; 0: OK
See Also:
Prop, App.go(String[], boolean), App.go(String[], String, boolean, CharSequence), App.mainThread