PHP string crypt() FunctionThe crypt() is predefined PHP string function. It is used to returns a hashed string by using DES, Blowfish, or MD5 algorithms. Following are some constants of crypt() function
Syntax:
Note: This crypt() function works with different operating System.Example 1Output: Standard DES: jtigeEQ4GnSRg \ Example 2Output: Extended DES: _S4..javac7kJCJPxtp6 Example 3Output: MD5: $1$javatpoi$/QyBQ/V7dJjcGaOq83EhL0 Note: 16 character salt starting with $5$ and the default number of rounds is 5000.Example 4Output: Blowfish: $2a$09$anexamplestringforsale8idRk7z/D1GAsmHMUTi1L/e7Cjcngiy Example 5Output: SHA-256: $5$rounds=5000$anexamplestringf$cdf4KmhoNRhj0riAq6kpiYdPHGWOBEnPxtPxje3Fjm2 Example 6Output: SHA-512: $6$rounds=5000$anexamplestringf$Oo0skOAdUFXkQxJpwzO05wgRHG0dhuaPBaOU/oNbGpCEKlf/7oVM5wn6AN0w2vwUgA0O24oLzGQpp1XKI6LLQ0 Example 7Output: SHA-512: $6$rounds=5000$anexamplestringf$Oo0skOAdUFXkQxJpwzO05wgRHG0dhuaPBaOU/oNbGpCEKlf/7oVM5wn6AN0w2vwUgA0O24oLzGQpp1XKI6LLQ0 Next TopicPHP String |