Project CASUAL
API for CASUAL
 All Classes Namespaces Functions Variables
Public Member Functions | List of all members
CASUAL.crypto.MD5sum Class Reference

Public Member Functions

boolean compareFileToMD5 (File f, String MD5)
 
String md5sum (InputStream is)
 
String md5sum (File f)
 
String md5sumStream (InputStream is)
 
boolean compareMD5StringsFromLinuxFormatToFilenames (String[] LinuxFormat, String[] MD5Filenames)
 
String md5sum (String string)
 
String[] splitMD5String (String md5)
 
String getMD5fromLinuxMD5String (String md5)
 
String getLinuxMD5Sum (File file)
 
String getLinuxMD5Sum (InputStream stream, String filename)
 
String getFileNamefromLinuxMD5String (String md5)
 
String convertMD5andFiletoLinuxMD5Sum (String md5, String filename)
 
boolean lineContainsMD5 (String testLine)
 
String pickNewMD5fromArrayList (ArrayList< String > newMd5List, String OldMD5)
 
boolean compareFileToMD5 (File f, String MD5)
 
String md5sum (InputStream is)
 
String md5sum (File f)
 
String md5sumStream (InputStream is)
 
boolean compareMD5StringsFromLinuxFormatToFilenames (String[] LinuxFormat, String[] MD5Filenames)
 
String md5sum (String string)
 
String[] splitMD5String (String md5)
 
String getMD5fromLinuxMD5String (String md5)
 
String getLinuxMD5Sum (File file)
 
String getLinuxMD5Sum (InputStream stream, String filename)
 
String getFileNamefromLinuxMD5String (String md5)
 
String convertMD5andFiletoLinuxMD5Sum (String md5, String filename)
 
boolean lineContainsMD5 (String testLine)
 
String pickNewMD5fromArrayList (ArrayList< String > newMd5List, String OldMD5)
 

Detailed Description

MD5sum provides MD5 tools for use in CASUAL

Author
Adam Outler adamo.nosp@m.utle.nosp@m.r@gma.nosp@m.il.c.nosp@m.om

Member Function Documentation

boolean CASUAL.crypto.MD5sum.compareFileToMD5 ( File  f,
String  MD5 
)

compares an MD5 to a file

Parameters
ffile to be compared
MD5expected MD5
Returns
true if matches
boolean CASUAL.crypto.MD5sum.compareFileToMD5 ( File  f,
String  MD5 
)

compares an MD5 to a file

Parameters
ffile to be compared
MD5expected MD5
Returns
true if matches
boolean CASUAL.crypto.MD5sum.compareMD5StringsFromLinuxFormatToFilenames ( String[]  LinuxFormat,
String[]  MD5Filenames 
)

compares files to MD5 to verify at least one matches

Parameters
LinuxFormatMD5 to compare
MD5Filenamesfilenames to be checked
Returns
true if all MD5s were matched to files
boolean CASUAL.crypto.MD5sum.compareMD5StringsFromLinuxFormatToFilenames ( String[]  LinuxFormat,
String[]  MD5Filenames 
)

compares files to MD5 to verify at least one matches

Parameters
LinuxFormatMD5 to compare
MD5Filenamesfilenames to be checked
Returns
true if all MD5s were matched to files
String CASUAL.crypto.MD5sum.convertMD5andFiletoLinuxMD5Sum ( String  md5,
String  filename 
)

returns a standard md5sum

Parameters
md5md5 to be inserted
filenamefilename to be appended
Returns
linux md5sum
String CASUAL.crypto.MD5sum.convertMD5andFiletoLinuxMD5Sum ( String  md5,
String  filename 
)

returns a standard md5sum

Parameters
md5md5 to be inserted
filenamefilename to be appended
Returns
linux md5sum
String CASUAL.crypto.MD5sum.getFileNamefromLinuxMD5String ( String  md5)

gets filename from linux md5sum

Parameters
md5linux md5sum
Returns
filename of md5sum input
String CASUAL.crypto.MD5sum.getFileNamefromLinuxMD5String ( String  md5)

gets filename from linux md5sum

Parameters
md5linux md5sum
Returns
filename of md5sum input
String CASUAL.crypto.MD5sum.getLinuxMD5Sum ( File  file)

Returns the standard md5sum found on Linux as though the file were in the same directory

Parameters
fileto be MD5sum'd
Returns
32digitMd5Sum+" "+file.Name
String CASUAL.crypto.MD5sum.getLinuxMD5Sum ( File  file)

Returns the standard md5sum found on Linux as though the file were in the same directory

Parameters
fileto be MD5sum'd
Returns
32digitMd5Sum+" "+file.Name
String CASUAL.crypto.MD5sum.getLinuxMD5Sum ( InputStream  stream,
String  filename 
)

Returns the standard md5sum found on Linux as though the file were in the same directory

Parameters
streamto be MD5sum'd
filenameto append to the stream
Returns
32digitMd5Sum+" "+file.Name
String CASUAL.crypto.MD5sum.getLinuxMD5Sum ( InputStream  stream,
String  filename 
)

Returns the standard md5sum found on Linux as though the file were in the same directory

Parameters
streamto be MD5sum'd
filenameto append to the stream
Returns
32digitMd5Sum+" "+file.Name
String CASUAL.crypto.MD5sum.getMD5fromLinuxMD5String ( String  md5)

returns MD5 from a linux md5sum

Parameters
md5linux MD5sum
Returns
md5
String CASUAL.crypto.MD5sum.getMD5fromLinuxMD5String ( String  md5)

returns MD5 from a linux md5sum

Parameters
md5linux MD5sum
Returns
md5
boolean CASUAL.crypto.MD5sum.lineContainsMD5 ( String  testLine)

tests to see if a line matches an md5sum

Parameters
testLineline in question
Returns
true if this is contains a 32 byte hex string
boolean CASUAL.crypto.MD5sum.lineContainsMD5 ( String  testLine)

tests to see if a line matches an md5sum

Parameters
testLineline in question
Returns
true if this is contains a 32 byte hex string
String CASUAL.crypto.MD5sum.md5sum ( InputStream  is)

gets MD5 of input stream

Parameters
isstream to be MD5d
Returns
md5 of stream
String CASUAL.crypto.MD5sum.md5sum ( InputStream  is)

gets MD5 of input stream

Parameters
isstream to be MD5d
Returns
md5 of stream
String CASUAL.crypto.MD5sum.md5sum ( File  f)

MD5s a file

Parameters
ffile to MD5
Returns
md5 of file
String CASUAL.crypto.MD5sum.md5sum ( File  f)

MD5s a file

Parameters
ffile to MD5
Returns
md5 of file
String CASUAL.crypto.MD5sum.md5sum ( String  string)

MD5Sums a file

Parameters
stringrepresentation of path to file on hard disk.
Returns
MD5Sum of file.
String CASUAL.crypto.MD5sum.md5sum ( String  string)

MD5Sums a file

Parameters
stringrepresentation of path to file on hard disk.
Returns
MD5Sum of file.
String CASUAL.crypto.MD5sum.md5sumStream ( InputStream  is)

md5s an input stream

Parameters
isstream to MD5
Returns
md5 of stream
String CASUAL.crypto.MD5sum.md5sumStream ( InputStream  is)

md5s an input stream

Parameters
isstream to MD5
Returns
md5 of stream
String CASUAL.crypto.MD5sum.pickNewMD5fromArrayList ( ArrayList< String >  newMd5List,
String  OldMD5 
)

picks the new MD5 if available

Parameters
newMd5Listnew MD5s
OldMD5old md5s
Returns
new md5s if available
String CASUAL.crypto.MD5sum.pickNewMD5fromArrayList ( ArrayList< String >  newMd5List,
String  OldMD5 
)

picks the new MD5 if available

Parameters
newMd5Listnew MD5s
OldMD5old md5s
Returns
new md5s if available
String [] CASUAL.crypto.MD5sum.splitMD5String ( String  md5)

splits a Linux MD5sum value into a md5 and a filename

Parameters
md5linux md5 sum
Returns
md5,filename
String [] CASUAL.crypto.MD5sum.splitMD5String ( String  md5)

splits a Linux MD5sum value into a md5 and a filename

Parameters
md5linux md5 sum
Returns
md5,filename

The documentation for this class was generated from the following file: