MD5.ComputeHash()

Categories: dreamweaver
Comments: No Comments
Published on: 2011/08/15

By the power of magic, the following will work:

function get_VB_hash($text) {

$hash = md5($text);

 

$hex = pack('H*', $hash);

// Pack as a hex string

 

$int_arr = unpack('C*', $hex);

// Unpack as unsigned chars

 

return $int_arr; }

 

or as one line:

unpack('C*', pack('H*', md5($text)) );

 

延伸閱讀

http://stackoverflow.com/questions/5544884/how-to-mimic-computehash-vb-function-in-php

Comments are closed.

Welcome , today is 星期一, 2024/05/06