PHP 8.0.30
Preview: XSalsa20.php Size: 1.34 KB
/home/certprox/zang.certproxywizard.com/wp/wp-includes/sodium_compat/src/Core/XSalsa20.php

<?php

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

/**
 * Class ParagonIE_Sodium_Core_XSalsa20
 */
abstract class ParagonIE_Sodium_Core_XSalsa20 extends ParagonIE_Sodium_Core_HSalsa20
{
    /**
     * Expand a key and nonce into an xsalsa20 keystream.
     *
     * @internal You should not use this directly from another application
     *
     * @param int $len
     * @param string $nonce
     * @param string $key
     * @return string
     * @throws SodiumException
     * @throws TypeError
     */
    public static function xsalsa20($len, $nonce, $key)
    {
        $ret = self::salsa20(
            $len,
            self::substr($nonce, 16, 8),
            self::hsalsa20($nonce, $key)
        );
        return $ret;
    }

    /**
     * Encrypt a string with XSalsa20. Doesn't provide integrity.
     *
     * @internal You should not use this directly from another application
     *
     * @param string $message
     * @param string $nonce
     * @param string $key
     * @return string
     * @throws SodiumException
     * @throws TypeError
     */
    public static function xsalsa20_xor($message, $nonce, $key)
    {
        return self::xorStrings(
            $message,
            self::xsalsa20(
                self::strlen($message),
                $nonce,
                $key
            )
        );
    }
}

Directory Contents

Dirs: 7 × Files: 17

Name Size Perms Modified Actions
AEGIS DIR
- drwxr-xr-x 2026-03-30 10:07:44
Edit Download
AES DIR
- drwxr-xr-x 2026-03-30 10:07:44
Edit Download
Base64 DIR
- drwxr-xr-x 2026-03-30 10:07:44
Edit Download
ChaCha20 DIR
- drwxr-xr-x 2026-03-30 10:07:44
Edit Download
- drwxr-xr-x 2026-03-30 10:07:44
Edit Download
Poly1305 DIR
- drwxr-xr-x 2026-03-30 10:07:44
Edit Download
- drwxr-xr-x 2026-03-30 10:07:44
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-- 2026-01-26 20:53:30
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).