-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDecryptionKey.php
More file actions
40 lines (35 loc) · 893 Bytes
/
DecryptionKey.php
File metadata and controls
40 lines (35 loc) · 893 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
40
<?php
namespace Fingerprint\ServerAPI\Sealed;
/**
* Holds a decryption key and its algorithm for unsealing sealed results.
*/
class DecryptionKey
{
private readonly string $key;
private readonly string $algorithm;
/**
* Creates a new DecryptionKey instance.
*
* @param string $key raw binary decryption key
* @param string $algorithm algorithm identifier ({@see DecryptionAlgorithm})
*/
public function __construct(string $key, string $algorithm)
{
$this->key = $key;
$this->algorithm = $algorithm;
}
/**
* Returns the raw binary decryption key.
*/
public function getKey(): string
{
return $this->key;
}
/**
* Returns the algorithm identifier ({@see DecryptionAlgorithm}).
*/
public function getAlgorithm(): string
{
return $this->algorithm;
}
}