-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKDF.php
More file actions
39 lines (32 loc) · 860 Bytes
/
KDF.php
File metadata and controls
39 lines (32 loc) · 860 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;
/**
* KDF identifiers referenced by MLS cipher suites (RFC 9420 Table 7).
*/
final class KDF
{
public const HKDF_SHA256 = 0x0001;
public const HKDF_SHA384 = 0x0002;
public const HKDF_SHA512 = 0x0003;
protected const NAME_MAP = [
self::HKDF_SHA256 => 'HKDF-SHA256',
self::HKDF_SHA384 => 'HKDF-SHA384',
self::HKDF_SHA512 => 'HKDF-SHA512',
];
public function __construct()
{
}
public static function nameOf(int $value): ?string
{
return self::NAME_MAP[$value] ?? null;
}
}