As i saw in the tests, i'm building the token like this:
byte[] seed = new byte[32];
var sk = Ed25519.ExpandedPrivateKeyFromSeed(seed);
var token = new PasetoBuilder<Version2>()
.WithKey(sk)
.AddClaim("example", "Hello Paseto!")
.Expiration(DateTime.UtcNow.AddHours(24))
.AsPublic() // Purpose
.Build();
Everything normal here, works fine.
But when trying to decode the token:
As i saw in the tests, you're using a PublicKeyV2 var with a base64 encoded value
but, where do i get the public key? already tried using the same method as above, using the Ed25519.PublicKeyFromSeed(seed) rather than ExpandedPrivateKeyFromSeed(seed) but with no results, throwing the error "Invalid Signature"
What's the proper way to decode the token?
Thanks
As i saw in the tests, i'm building the token like this:
Everything normal here, works fine. But when trying to decode the token: As i saw in the tests, you're using a PublicKeyV2 var with a base64 encoded value but, where do i get the public key? already tried using the same method as above, using the
Ed25519.PublicKeyFromSeed(seed)
rather thanExpandedPrivateKeyFromSeed(seed)
but with no results, throwing the error "Invalid Signature" What's the proper way to decode the token? Thanks