SHA256 hashes with Message
| From: | pear at kenthouse dot info | Date: | Mon, 01 Nov 2004 16:58:50 +0000 |
| Subject: | SHA256 hashes with Message | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15278@lists.php.net to get a copy of this message | ||
Having trouble wit the syntax to create an SHA256 hash from a string using
the Message package. Works fine for the 'fallback' encryption methods - SHA1
and MD5, but the I could have done that natively in PHP without PEAR.
Works fine ....
$hash = Message::createHash('MD5');
echo 'MD5: '.$hash->calc($data)."\n";
Doesn't work ....
$hash = Message::createHash('SHA256');
echo 'SHA256: '.$hash->calc($data)."\n";
The docs hint at a different syntax for hashing with SHA256, but I can't get
it to work with any permutation of commands.
Anyone got the magic command?
Many thanks
Kevin