<?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);
}
}
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| AEGIS/ | 2026-02-23 19:41 | 14.41 KB | 76129f60960:kunden | dxwrx-rx-r | |
| AES/ | 2026-02-23 19:41 | 12.35 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Base64/ | 2026-02-23 19:41 | 16.56 KB | 76129f60960:kunden | dxwrx-rx-r | |
| ChaCha20/ | 2026-02-23 19:41 | 5.6 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Curve25519/ | 2026-02-23 19:41 | 124.61 KB | 76129f60960:kunden | dxwrx-rx-r | |
| Poly1305/ | 2026-02-23 19:41 | 12.61 KB | 76129f60960:kunden | dxwrx-rx-r | |
| SecretStream/ | 2026-02-23 19:41 | 3.54 KB | 76129f60960:kunden | dxwrx-rx-r | |
| AEGIS128L.php | 2026-02-23 19:41 | 3.58 KB | 76129f60960:kunden | -xw-x----- | |
| AEGIS256.php | 2026-02-23 19:41 | 3.51 KB | 76129f60960:kunden | -xw-x----- | |
| AES.php | 2026-02-23 19:41 | 15.51 KB | 76129f60960:kunden | -xw-x----- | |
| BLAKE2b.php | 2026-02-23 19:41 | 23.63 KB | 76129f60960:kunden | -xw-x----- | |
| ChaCha20.php | 2026-02-23 19:41 | 12.59 KB | 76129f60960:kunden | -xw-x----- | |
| Curve25519.php | 2026-02-23 19:41 | 140.27 KB | 76129f60960:kunden | -xw-x----- | |
| Ed25519.php | 2026-02-23 19:41 | 18.05 KB | 76129f60960:kunden | -xw-x----- | |
| HChaCha20.php | 2026-02-23 19:41 | 4.04 KB | 76129f60960:kunden | -xw-x----- | |
| HSalsa20.php | 2026-02-23 19:41 | 3.59 KB | 76129f60960:kunden | -xw-x----- | |
| Poly1305.php | 2026-02-23 19:41 | 1.54 KB | 76129f60960:kunden | -xw-x----- | |
| Ristretto255.php | 2026-02-23 19:41 | 21.37 KB | 76129f60960:kunden | -xw-x----- | |
| Salsa20.php | 2026-02-23 19:41 | 8.04 KB | 76129f60960:kunden | -xw-x----- | |
| SipHash.php | 2026-02-23 19:41 | 8.04 KB | 76129f60960:kunden | -xw-x----- | |
| Util.php | 2026-02-23 19:41 | 28.23 KB | 76129f60960:kunden | -xw-x----- | |
| X25519.php | 2026-02-23 19:41 | 8.22 KB | 76129f60960:kunden | -xw-x----- | |
| XChaCha20.php | 2026-02-23 19:41 | 3.24 KB | 76129f60960:kunden | -xw-x----- | |
| XSalsa20.php | 2026-02-23 19:41 | 1.34 KB | 76129f60960:kunden | -xw-x----- | |