what is the different between encryption and digest? i don't understand their difference.
Encryption conceals the contents of the plaintext, while a digest is a special kind of hash that acts as a sort of fingerprint for the data. If the message digest is encrypted with a private key, this can be used as a digital signature to ensure that it came from a particular source.
encryption takes a plain text and converts it to an encrypted text using a key and an encryption algorithm. The resulting encrypted text can later be decrypted (by using the key and the algorithm)
digest takes a plain text and generates a hashcode which can be used to verify if the plain text is unmodified but ich CANNOT be used to decrypt the original text form the hash value
Encryption is a way of "Security by Obscurity." It is exactly what the word suggests, to encrypt, to encode, etc.. and ANYTHING that is encrypted/encoded CAN be decrypted/decoded (seeing as how they are the antonyms and all) Assuming you know how whatever was encrypted.
A digest on the other hand, or hash.. is something that cannot be reversed. Usually a particular hashing algorithm will return a "fingerprint" in a set bit size. For instance, 128-bits. The algorithm somehow digests everything into a simple 128 bit string... using mathematical equations and such to keep a decryption impossible.
In closing, encryption is meant to hide things from others, while hashing is meant to identify. Like passwords for instance, you would never encrypt a password...mainly because you risk the chance of someone actually decrypting it.
There are rumors out there that hashes/digests CAN be reversed through use of a "resource" out there somewhere, but in reality, it is nothing but a collection of hashes in a databases and if one just so happens to type in a string that hashes to the same value in one of the records of this database -- it is called a collision at the most. Either the hash has been salted differently, or you actually got lucky enough to match a hash.