What are the functions for IMAP?What Is a Persistent Cookie?So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()? ~ Interview Questions & Answers

Tuesday, June 28, 2011

What are the functions for IMAP?

imap_body - Read the message body
imap_check - Check current mailbox
imap_delete - Mark a message for deletion from current mailbox
imap_mail - Send an email message

What Is a Persistent Cookie?

A persistent cookie is a cookie which is stored in a cookie file permanently on the browser's computer. By default, cookies are created as temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased. You should decide when to use temporary cookies and when to use persistent cookies based on their differences:
*Temporary cookies can not be used for tracking long-term information.
*Persistent cookies can be used for tracking long-term information.
*Temporary cookies are safer because no programs other than the browser can access them.
*Persistent cookies are less secure because users can open cookie files see the cookie values.

Wednesday, June 8, 2011

So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?

Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.