[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

Two simple questions

Please answer the questions or provide links to find the answers

11.      What is RFC 1321 and how does it help create a hash function in software?

17.      What does the following function perform?
double_hash = hex_md5(str_md5(data));

2 Solutions
Lee W, MVPTechnology and Business Process AdvisorCommented:
Ever use google?  Just put in "RFC 1321" and search.  The first 10 hits at least are all about it.

The second question only has two results, but the first looked like an answer for you.
RFCs are technical papers that describe/define something, usually related to the Internet. RFC 1321 in particular describes the MD5 message-digest algorithm, which is a hash function most often used to identify a valid password without actually storing it (it is a one-way hash, so the hashed text can't be recovered), or to verify the integrity of a file after being transfered (by generating hashes before and after the transfer and comparing them).

Assuming the code you provided is JavaScript, it generates two successive hashes on some data. It isn't actually a function, but two function calls. str_md5() generates the hash of the data in the <data> variable, and returns it as a string (each byte of the hash is encoded as a character). Then, on the result, hex_md5() is called, and it generates another hash, stored as a sequence of the hex values of the hash bytes encoded as strings.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

lukegriffiths110Author Commented:
This is homework and I know how to use Google (wikipedia etc) so defining RFC 1321 would not be a problem. I understand hashing but I need to know in detail how RFC 1321 helps to create a hash function in software. I could not answer the second question but do not expect ee to answer in full, but I do expect information to be provided that will help in answering.
HAHA,, its nothing like doing homework for ya.. A MD5 has or another popular hash is SHA. Take example your homework, you are probably creating this file within microsoft word. As soon as you save this file go  here and download this tool http://www.diamondcs.com.au/freeutilities/md5.php and check the "HASH" of your file. This hash is an algorithm in itself, it than takes the DATA you just wrote and some other factors and spits out a HASH or special number. Keep this number written down. Now go and add a line to the paper you just created, just put your name or a word or letter and save it again. Reproduce the hash and you will see you have a different hash output. Every time you change a character the hash will change.. This insues integrity of a file, the can work hand and hand when you want to make sure when you transfer a file it doesnt become corrupt in the transfer and also works hand in hand with many other things, but a big one we use it in is VPN'S this along with encryption allows us to not only validate the integrity of the message or files being sent but also we know we can use this with encryption schemes like des, 3des, AES, cast, etc. etc.

The other code you posted is java code you could write  to perform a double hash of a file.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now