#key #generate-keys #product #valid #windows #validate #win95

win95-keygen

A lightweight library to generate valid Win95 product keys

3 unstable releases

0.2.0 Jun 20, 2023
0.1.1 Jun 18, 2023
0.1.0 Jun 18, 2023

#1672 in Algorithms

MIT license

12KB
158 lines

Windows 95 product key generation library

For more info about the library, check the docs

If all you want is a binary to generate those keys, we got you covered

References


lib.rs:

A lightweight library used to generate and validate Win95 keys

Usage of the library is pretty simple, for more info check the generate and validate modules

References:

Each function in this module takes no arguments and returns a String containing a valid key

Example

// Import the library
use win95_keygen::generate as keygen;

fn main() {
    println!("Generating a valid Windows 95 CD activation key...");

    // Generate a valid CD key and print it to the console
    let key: String = keygen::cd_normal();
    println!("Key: {}", key);
}

Check validity of Win95 keys

Example

// This example generates a random Win95 key, then checks it's validity

// Import the library
use win95_keygen::{generate as keygen, validate as keyvalid};

fn main() {
    println!("Generating a valid Windows 95 OEM activation key...");

    // Generate a valid OEM key and print it to the console
    let key: String = keygen::cd_normal();
    println!("Key: {}", key);

    // Check if the key generated is valid
    println!("Checking key validity...");
    let is_valid = keyvalid::cd_normal(&key);

    // If yes, log to console. Otherwise, panic
    if is_valid {
        println!("Key generated is valid!");
    } else {
        panic!("Generated erroneous key!");
    }
}

Dependencies

~310KB