-
Hi! My secret key was generated using PHP Paseto with openssl_random_pseudo_bytes(32) and then converted from bin to hex. const paseto = require('paseto');
const { V3: { decrypt } } = paseto;
(async () => {
{
const payload = await decrypt("example_token", "b244ac595fbe3a6ea8c3fad93f66d15221121428fd03dcccf32203e364f504ed")
}
})() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
By the way: is the required length editable somehow?? |
Beta Was this translation helpful? Give feedback.
-
"b244ac595fbe3a6ea8c3fad93f66d15221121428fd03dcccf32203e364f504ed" is 64 octets, not 32, you need to decode your hex encoded string into a 32 byte buffer first.
|
Beta Was this translation helpful? Give feedback.
"b244ac595fbe3a6ea8c3fad93f66d15221121428fd03dcccf32203e364f504ed" is 64 octets, not 32, you need to decode your hex encoded string into a 32 byte buffer first.