code/libraries/joomlatools/library/user/session/container/metadata.php
public static function _validateNonce($secret, $nonce)
    {
        if (is_string($nonce) == false) {
            return false;
        }

        $a = explode(':', $nonce);
        if (count($a) != 3) {
            return false;
        }

        $salt     = $a[0];
        $lifetime = intval($a[1]);
        $hash     = $a[2];
        $back     = hash_hmac( 'sha1', $salt.$lifetime,  $secret );

        if ($back != $hash) {
            return false;
        }

        if (time() > $lifetime) {
            return false;
        }

        return true;
    }
public static function _validateNonce($secret, $nonce)
    {
        if (is_string($nonce) == false) {
            return false;
        }

        $a = explode(':', $nonce);
        if (count($a) != 3) {
            return false;
        }

        $salt     = $a[0];
        $lifetime = intval($a[1]);
        $hash     = $a[2];
        $back     = hash_hmac( 'sha1', $salt.$lifetime,  $secret );

        if ($back != $hash) {
            return false;
        }

        if (time() > $lifetime) {
            return false;
        }

        return true;
    }
public static function _validateNonce ( $ secret , $ nonce ) { if ( is_string ( $ nonce ) == false ) { return false ; } $ a = explode ( ':' , $ nonce ) ; if ( count ( $ a ) != 3 ) { return false ; } $ salt = $ a [ 0 ] ; $ lifetime = intval ( $ a [ 1 ] ) ; $ hash = $ a [ 2 ] ; $ back = hash_hmac ( 'sha1' , $ salt . $ lifetime , $ secret ) ; if ( $ back != $ hash ) { return false ; } if ( time ( ) > $ lifetime ) { return false ; } return true ; }
Check a previously generated Nonce.

The nonce should contains three parts, separated by a colon. The first part is the individual salt. The
second part is the time until the nonce is valid. The third part is a hmac hash of the salt, the time, and
a secret value.

@param string  $secret  String with at least 10 characters. The same value must be passed to _validateNonce().
@param string  $nonce
@returns bool Whether the Nonce is valid.
Check a previously generated Nonce .