我需要一个对称密钥加密算法,它只返回结果中的字母和数字,而不返回任何元字符。PHP中有什么内容吗?
假设您使用encrypt()和decrypt(。您可以使用:
$plaintext = "My Super Secret";
$cryptbin = encrypt($plaintext, $mykey);
$crypthex = bin2hex($cryptbin); // This is ascii
// some code and you want to decrypt later...
$cryptbin = hex2bin($crypthex);
$plaintext = decrypt($cryptbin, $mykey);