Fix critical bug in Crypto::unencapsulate
- The direction of the sub-function has been corrected
This commit is contained in:
parent
acb9e8d356
commit
291f11a8bb
1 changed files with 4 additions and 3 deletions
|
@ -461,11 +461,12 @@ class Crypto
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$alg = ((array_key_exists('alg', $data)) ? $data['alg'] : 'aes256cbc');
|
$alg = $data['alg'] ?? 'aes256cbc';
|
||||||
if ($alg === 'aes256cbc') {
|
if ($alg === 'aes256cbc') {
|
||||||
return self::encapsulateAes($data['data'], $prvkey);
|
return self::unencapsulateAes($data['data'], $prvkey);
|
||||||
}
|
}
|
||||||
return self::encapsulateOther($data['data'], $prvkey, $alg);
|
|
||||||
|
return self::unencapsulateOther($data, $prvkey, $alg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue