https://open.feishu.cn/document/uYjL24iN/ugjMx4COyEjL4ITM
示例中没有 php 语言,看来 php 是真的不重视了,上次集成 google firebase 也是,官方没提供 php 支持。
if ($user) {
$aesKey = base64_decode($user->sessionKey);
$aesIV = base64_decode($iv);
$aesCipher = base64_decode($encryptedData);
$result = openssl_decrypt( $aesCipher, 'AES-128-CBC', $aesKey, 1, $aesIV );
info( json_encode($result) );
info( openssl_error_string() );
/*$user->update([
'avatarUrl' => $avatarUrl,
'nickName' => $nickName,
]);*/
}
报错
local.ERROR: openssl_decrypt(): IV passed is 24 bytes long which is longer than the 16 expected by selected cipher, truncating {"exception":"[object] (ErrorException(code: 0): openssl_decrypt(): IV passed is 24 bytes long which is longer than the 16 expected by selected cipher