Git Product home page Git Product logo

libpaseto's People

Contributors

minus7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

libpaseto's Issues

set expiration

Hello. I was wondering if there is the posibility to specify the exp time on a token

Bind Keys to Purpose

const uint8_t key[paseto_v2_LOCAL_KEYBYTES],

const uint8_t key[paseto_v2_LOCAL_KEYBYTES],

See https://github.com/paseto-standard/paseto-spec/blob/master/docs/02-Implementation-Guide/03-Algorithm-Lucidity.md

Right now, byte arrays are accepted by this API. There's no mechanism to prevent a user from using a v2 public key as a v2 local key.

It may also be a good idea to bind keys to a version, in case you want to support v4 tokens too.

Will paseto_v2_encrypt always terminate with a nul \0 byte?

Apologies for the incorrect use of an issue but it feels like the best place to ask. I need a little guidance since I'm not very proficient at reading C and don't want to take something for granted that could potentially be unsafe.

I've written some Crystal C bindings for this library and the largest area of concern is that I'm allowing the Crystal string initialiser to step over the returned pointer from paseto_v2_encrypt which appears to terminate whenever reaches a zero byte.

The libsodium docs suggest that the returned char* will be terminated with a \0 character so I'm assuming that would be enough in this instance?

Thanks for the lib!

Unable to load V2 secret or public key with base64

Using an ESP32. Coding in Arduino.

I'm attempting to use paseto_v2_public_load_secret_key_base64 and paseto_v2_public_load_public_key_base64 functions but I'm unable to load the the keys.

I've attempted many different base64 encoding methods, including the base encoded strings generated by openssl, but not had any luck so far.

I note that https://github.com/authenticvision/libpaseto/blob/master/examples/example.c is the paseto_v2_local_load_key_base64 function and this works as expected.

I also note that you've written some tests for the paseto_v2_public_load_secret_key_hex function, and using this function with the same hex encoded strings works as expected.

Would you be able to add an example using the paseto_v2_public_load_secret_key_base64 and paseto_v2_public_load_public_key_base64 functions please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.