-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAEAD.php
More file actions
39 lines (32 loc) · 875 Bytes
/
AEAD.php
File metadata and controls
39 lines (32 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
/*
* This file is a part of the DiscordPHP-RFC9420 project.
*
* Copyright (c) 2026-present Valithor Obsidion <valithor@discordphp.org>
*
* This file is subject to the MIT license that is bundled
* with this source code in the LICENSE.md file.
*/
namespace MLS\Enums;
/**
* AEAD identifiers referenced by MLS cipher suites (RFC 9420 Table 7).
*/
final class AEAD
{
public const AES128_GCM = 0x0001;
public const AES256_GCM = 0x0002;
public const CHACHA20_POLY1305 = 0x0003;
protected const NAME_MAP = [
self::AES128_GCM => 'AES-128-GCM',
self::AES256_GCM => 'AES-256-GCM',
self::CHACHA20_POLY1305 => 'ChaCha20Poly1305',
];
public function __construct()
{
}
public static function nameOf(int $value): ?string
{
return self::NAME_MAP[$value] ?? null;
}
}