Skip to content

PKCE code verifier and challenge generation in Rust

Notifications You must be signed in to change notification settings

GabrielRPrada/pkce-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

PKCE code verifier and challenge generation in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages