added new composer libraries

This commit is contained in:
2021-02-11 20:21:58 +00:00
parent 0a11a5d23d
commit f8426666ee
40 changed files with 1175 additions and 10022 deletions

View File

@@ -61,16 +61,19 @@ class Decrypt extends AbstractLoader
public function enc($enc): self
{
$clone = clone $this;
switch (true) {
case is_string($enc):
$clone->allowedContentEncryptionAlgorithms[] = $enc;
return $clone;
case $enc instanceof Algorithm:
$clone->algorithms[$enc->name()] = $enc;
$clone->allowedContentEncryptionAlgorithms[] = $enc->name();
return $clone;
default:
throw new InvalidArgumentException('Invalid parameter "enc". Shall be a string or an algorithm instance.');
}