Estoy usando use Namshi\JOSE\SimpleJWS: Al desencriptar no funciona.
Sale el siguiente error :
SimpleJWT\InvalidTokenException Unexpected algorithm
https://dinochiesa.github.io/jwt/
$set = new KeySet();
$set->add(new SymmetricKey([ "kty" => "oct", "k" => "CLAVE_KEY", "kid" => "1" ], 'php')); $headers = ['alg' => 'dir', 'enc' => 'A128CBC-HS256']; $plaintext = 'TOKEN_KEY'; $jwt = new \SimpleJWT\JWE($headers, $plaintext); $jwt->decrypt( $plaintext, $set , 'A128CBC-HS256');
https://stackoverflow.com/questions/67443450/jwe-jwt-decrypt-a128cbc-hs256-keys-laravel May 08, 2021 at 10:07AM
没有评论:
发表评论