这是我第一次尝试处理python代码。我的客户最近给了我一个python代码:
python -c 'import crypt; print crypt.crypt("Pa55w0rd!", "$6$x88yEvVg")'
用于加密密码,在上面的代码中。你知道吗
密码是Pa55w0rd!盐值为x88yevvvg。我可以用PHP执行上面的代码吗?我试过这样做:
echo exec(`python -c "import crypt;print crypt.crypt('Pa55w0rd!', '\$6\$x88yEvVg\')"`);
谢谢。你知道吗
使用^{} 或^{} 。你知道吗
例如:
你真的需要用python加密吗?根据您的PHP版本,您可以对PHP>;=5.3执行以下操作:
对于php5.2或5.1
这假设您的salt值只是与您的密码值串联在一起。你知道吗
相关问题 更多 >
编程相关推荐