";
} else { echo "Standard DES not supported.\n
";
} if (CRYPT_EXT_DES == 1) { echo "Extended DES: ".crypt("hello world")."\n
";
} else { echo "Extended DES not supported.\n
";
} if (CRYPT_MD5 == 1) { echo "MD5: ".crypt("hello world")."\n
";
} else { echo "MD5 not supported.\n
";
} if (CRYPT_BLOWFISH == 1) { echo "Blowfish: ".crypt("hello world");
} else { echo "Blowfish DES not supported.";
} ?>
輸出類似(依賴於操作系統):
Standard DES: $1$x1..m51.$S9eN2XHx9aLlymysul5S61
Extended DES: $1$1/1..P0.$Ne8OHrwbeApGOs7qMveZO1
MD5: $1$tz0.yg5.$jzwIVaBJMDuO6kjwusuNm.
Blowfish: $1$Tq..gv4.$Sbegig2uoMeuFkptKWnyk1
PHP String 函數