Documentation

Hash.php

Wrapper around hash() and hash_hmac() functions supporting truncated hashes such as sha256-96. Any hash algorithm returned by hash_algos() (and truncated versions thereof) are supported.

If setKey() is called, hash() will return the HMAC as opposed to the hash.

Here's a short example of how to use this library:

setKey('abcdefg'); echo base64_encode($hash->hash('abcdefg')); ?>
Tags
category

Crypt

author

Jim Wigginton terrafrost@php.net

author

Andreas Fischer bantu@phpbb.com

copyright

2015 Jim Wigginton

copyright

2015 Andreas Fischer

license

http://www.opensource.org/licenses/mit-license.html MIT License

link
http://phpseclib.sourceforge.net

Table of Contents

Classes

Hash

        
On this page

Search results