Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within I/O and Streams
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
I/O and Streams
How to identify the changes in a file?
sathish
Ranch Hand
Posts: 33
posted 23 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can anyone advise me on the MD5 algorithm to identify the changed files in a directory? or how to use the algorithm in
java
?
Jim Baiter
Ranch Hand
Posts: 532
posted 23 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
MD5 is supported by the java.security package. This is a
snippet example of using it.
MessageDigest md; String digestString = ""; try { md = MessageDigest.getInstance(alg); byte[] hash = md.digest(s.getBytes("ISO-8859-1")); digestString = new String(hash, "ISO-8859-1"); } catch (UnsupportedEncodingException e) { return "ISO Latin encoding not supported"; } catch (NoSuchAlgorithmException e) { return "MD5 not supported"; }
Carl Trusiak
Sheriff
Posts: 3341
posted 23 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
sathish,
We have a
policy on names
sathish doen't comply. It's really for your benifit. We do a book giveaway and only those who post to a certain topic and meet the nameing policy are entered. See
Book Promotion
page.
I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
encrypt and decrypt a file in Java
properties subsystem
How to Decrypt password
PBEWithMD5AndDES - behind the scenes
md5 algorithm
More...