Giter Club home page Giter Club logo

Comments (2)

odomojuli avatar odomojuli commented on August 29, 2024

New Github token format added.
1882025

Implementation follows mostly from:
https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats/

The snippet about entropy details format:

Math.log(((“a”..“z”).to_a + (“A”..“Z”).to_a + (0..9).to_a).length)/Math.log(2) * 30 = 178

30 characters, and then a 6-digit checksum at the end.

A 32 bit checksum in the last 6 digits of each token strikes the optimal balance between keeping the random token portion at a consistent entropy and enough confidence in the checksum. We start the implementation with a CRC32 algorithm, a standard checksum algorithm. We then encode the result with a Base62 implementation, using leading zeros for padding as needed.


Addendum: there's some regex patterns for things like GitHub actions and concatenating the PAT:
https://gist.github.com/magnetikonline/073afe7909ffdd6f10ef06a00bc3bc88

I can't seem to find the desired documentation that illustrates the scope of this behavior.
So I'm leaving this issue open until those entries are covered.

from regextokens.

ramazansancar avatar ramazansancar commented on August 29, 2024

Wouldn't it make sense to write it on 2 different lines as before April 5, 2021 and as Beta?

from regextokens.

Related Issues (10)

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.