3 unstable releases
0.2.0 | Jun 20, 2023 |
---|---|
0.1.1 | Jun 18, 2023 |
0.1.0 | Jun 18, 2023 |
#1797 in Algorithms
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
- Key generation algorithm: https://gurney.dev/posts/mod7/
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:
- Key generation algorithm: https://gurney.dev/posts/mod7/ Generate new valid Win95 keys
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