Closed Jacobinoo closed 1 year ago
You need to pass the version as the second argument to SymmetricKey
.
- $sharedKey = new SymmetricKey(random_bytes(32));
+ $sharedKey = new SymmetricKey(random_bytes(32), new Version3);
PASETO is very strict about versioning.
Thank you so much! It works perfectly now.
I am trying to create a token using version 3 but it doesn't work! I'm getting an error: Uncaught ParagonIE\Paseto\Exception\InvalidVersionException: The given key is not intended for this version of PASETO. I would be grateful if someone would help me.