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

<?php

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

/**
 * Class ParagonIE_Sodium_Core_Poly1305
 */
abstract class ParagonIE_Sodium_Core_Poly1305 extends ParagonIE_Sodium_Core_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_Core_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_Core_Poly1305_State(
            self::substr($key, 0, 32)
        );
        $calc = $state
            ->update($m)
            ->finish();
        return self::verify_16($calc, $mac);
    }
}

Directory Contents

Dirs: 7 × Files: 18

Name Size Perms Modified Actions
AEGIS DIR
- drwxr-xr-x 2026-06-08 11:09:50
Edit Download
AES DIR
- drwxr-xr-x 2026-06-15 03:20:54
Edit Download
Base64 DIR
- drwxr-xr-x 2026-06-08 11:09:50
Edit Download
ChaCha20 DIR
- drwxr-xr-x 2026-06-15 03:20:58
Edit Download
- drwxr-xr-x 2026-06-15 03:21:04
Edit Download
Poly1305 DIR
- drwxr-xr-x 2026-06-15 03:21:06
Edit Download
- drwxr-xr-x 2026-06-08 11:09:50
Edit Download
3.58 KB lrw-r--r-- 2024-07-18 10:48:16
Edit Download
3.51 KB lrw-r--r-- 2024-07-18 10:48:16
Edit Download
15.51 KB lrw-r--r-- 2024-07-18 10:48:16
Edit Download
23.63 KB lrw-r--r-- 2022-03-24 13:20:08
Edit Download
12.59 KB lrw-r--r-- 2025-10-06 12:48:40
Edit Download
140.27 KB lrw-r--r-- 2025-10-06 12:48:40
Edit Download
18.05 KB lrw-r--r-- 2025-12-30 20:55:38
Edit Download
60.41 KB lrw-r--r-- 2026-07-26 21:29:32
Edit Download
4.04 KB lrw-r--r-- 2025-10-06 12:48:40
Edit Download
3.59 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
1.54 KB lrw-r--r-- 2025-10-06 12:48:40
Edit Download
21.37 KB lrw-r--r-- 2021-05-25 10:55:58
Edit Download
8.04 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download
8.04 KB lrw-r--r-- 2021-05-25 10:55:58
Edit Download
28.23 KB lrw-r--r-- 2025-10-06 12:48:40
Edit Download
8.22 KB lrw-r--r-- 2025-10-06 12:48:40
Edit Download
3.24 KB lrw-r--r-- 2025-10-06 12:48:40
Edit Download
1.34 KB lrw-r--r-- 2019-03-21 02:56:52
Edit Download

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