Вопрос

I'm using the python hashlib to get a condensed md5 value using the following command, can someone help me out with a compatible function?

hashlib.md5('my string').hexdigest()
Это было полезно?

Решение

$string = 'my string'
$encoded_string = md5($string);

Другие советы

echo md5('apple');
// => 1f3870be274f6c49b3e31a0c6728957f

produces the same result as

require 'digest/md5';
print Digest::MD5.hexdigest('apple');
# => 1f3870be274f6c49b3e31a0c6728957f
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top