• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

azjezz / psl / 22639129220

03 Mar 2026 07:26PM UTC coverage: 97.792% (-0.4%) from 98.201%
22639129220

Pull #607

github

azjezz
feat: introduce `Crypto` component

Signed-off-by: azjezz <azjezz@protonmail.com>
Pull Request #607: feat: introduce `Crypto` component

348 of 394 new or added lines in 49 files covered. (88.32%)

2 existing lines in 1 file now uncovered.

9302 of 9512 relevant lines covered (97.79%)

39.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Psl/Crypto/Symmetric/constants.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Psl\Crypto\Symmetric;
6

7
use const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES;
8
use const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES;
9
use const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES;
10
use const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES;
11
use const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES;
12

13
/**
14
 * The length of a symmetric encryption key in bytes.
15
 *
16
 * @var positive-int
17
 */
NEW
18
const KEY_BYTES = SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES;
×
19

20
/**
21
 * The length of the nonce used for AEAD encryption in bytes.
22
 *
23
 * @var positive-int
24
 */
NEW
25
const NONCE_BYTES = SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES;
×
26

27
/**
28
 * The length of the authentication tag appended to the ciphertext in bytes.
29
 *
30
 * @var positive-int
31
 */
NEW
32
const TAG_BYTES = SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES;
×
33

34
/**
35
 * The length of the stream encryption header in bytes.
36
 *
37
 * @var positive-int
38
 */
NEW
39
const STREAM_HEADER_BYTES = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES;
×
40

41
/**
42
 * The overhead added to each stream chunk in bytes.
43
 *
44
 * @var positive-int
45
 */
NEW
46
const STREAM_TAG_BYTES = SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES;
×
47

48
/**
49
 * Maximum allowed chunk size for stream encryption in bytes (16 MiB).
50
 *
51
 * @var positive-int
52
 */
NEW
53
const MAX_CHUNK_BYTES = 16 * 1024 * 1024;
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc