pkce

Crates.iopkce
lib.rspkce
version0.2.0
sourcesrc
created_at2020-07-13 18:50:01.0548
updated_at2023-02-26 05:21:08.001422
descriptionLibrary for generating PKCE code verifiers and challenges
homepage
repositoryhttps://github.com/StargazerG/pkce-rs
max_upload_size
id264787
size5,903
Gabriel Prada (GabrielRPrada)

documentation

README

pkce-rs

A very simple library for generating code verifiers and challenges to use for OAuth Proof Key for Code Exchange. It is not rocket science.

extern crate pkce;

fn main() {
    // Generate a random 128-byte code verifier (must be between 43 and 128 bytes)
    let code_verify = pkce::code_verifier(128);
    // Generate an encrypted code challenge accordingly
    let code_challenge = pkce::code_challenge(&code_verify);

    println!("Code challenge generated: {}", code_challenge);
}

Wow, it really is that simple.

Features

In order to support WebAssembly enable feature js.

Commit count: 12

cargo fmt