PHP 8.0.30
Preview: Poly1305.php Size: 1.55 KB
/home/certprox/template.certproxywizard.com/wp-includes/sodium_compat/src/Core32/Poly1305.php

<?php

if (class_exists('ParagonIE_Sodium_Core32_Poly1305', false)) {
    return;
}

/**
 * Class ParagonIE_Sodium_Core32_Poly1305
 */
abstract class ParagonIE_Sodium_Core32_Poly1305 extends ParagonIE_Sodium_Core32_Util
{
    const BLOCK_SIZE = 16;

    /**
     * @internal You should not use this directly from another application
     *
     * @param string $m
     * @param string $key
     * @return string
     * @throws SodiumException
     * @throws TypeError
     */
    public static function onetimeauth($m, $key)
    {
        if (self::strlen($key) < 32) {
            throw new InvalidArgumentException(
                'Key must be 32 bytes long.'
            );
        }
        $state = new ParagonIE_Sodium_Core32_Poly1305_State(
            self::substr($key, 0, 32)
        );
        return $state
            ->update($m)
            ->finish();
    }

    /**
     * @internal You should not use this directly from another application
     *
     * @param string $mac
     * @param string $m
     * @param string $key
     * @return bool
     * @throws SodiumException
     * @throws TypeError
     */
    public static function onetimeauth_verify($mac, $m, $key)
    {
        if (self::strlen($key) < 32) {
            throw new InvalidArgumentException(
                'Key must be 32 bytes long.'
            );
        }
        $state = new ParagonIE_Sodium_Core32_Poly1305_State(
            self::substr($key, 0, 32)
        );
        $calc = $state
            ->update($m)
            ->finish();
        return self::verify_16($calc, $mac);
    }
}

Directory Contents

Dirs: 4 × Files: 16

Name Size Perms Modified Actions
ChaCha20 DIR
- drwxr-xr-x 2026-06-15 03:21:14
Edit Download
- drwxr-xr-x 2026-06-15 03:21:18
Edit Download
Poly1305 DIR
- drwxr-xr-x 2026-06-15 03:21:21
Edit Download
- drwxr-xr-x 2026-06-08 11:09:50
Edit Download
21.80 KB lrw-r--r-- 2021-05-25 10:55:58
Edit Download
14.17 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
129.86 KB lrw-r--r-- 2022-03-24 13:20:08
Edit Download
15.37 KB lrw-r--r-- 2022-09-13 21:13:14
Edit Download
50.13 KB lrw-r--r-- 2026-07-26 21:29:34
Edit Download
5.17 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
6.78 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
24.00 KB lrw-r--r-- 2022-03-24 13:20:08
Edit Download
30.44 KB lrw-r--r-- 2022-03-24 13:20:08
Edit Download
1.55 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
11.24 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
6.46 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
209 B lrw-r--r-- 2019-03-21 02:56:52
Edit Download
10.78 KB lrw-r--r-- 2019-12-09 14:42:04
Edit Download
2.40 KB lrw-r--r-- 2022-03-24 13:20:08
Edit Download
1.35 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).