auth70 / paseto-ts

PASETO v4 (encrypt, decrypt, sign & verify) in TypeScript
MIT License
19 stars 6 forks source link

Fix PASERK string lengths in README #7

Closed francislavoie closed 4 months ago

francislavoie commented 4 months ago

The string lengths in the README don't seem correct.

Examples from the spec:

> strlen("k4.public.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8")
= 53

> strlen("k4.secret.cHFyc3R1dnd4eXp7fH1-f4CBgoOEhYaHiImKi4yNjo8c5WpIyC_5kWKhS8VEYSZ05dYfuTF-ZdQFV4D9vLTcNQ")
= 96

Reference:

The Uint8Array byte sizes should probably be adjusted too, but I'm not sure how to verify this.

miunau commented 4 months ago

Thanks!