All Projects → mlafeldt → codebreaker-rs

mlafeldt / codebreaker-rs

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
A Rust library to decrypt & encrypt any cheat code for CodeBreaker PS2

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to codebreaker-rs

ps2rd
Collection of tools to remotely debug PS2 games
Stars: ✭ 55 (+205.56%)
Mutual labels:  homebrew, game-hacking, ps2
CheatDevicePS2
Game enhancer for PlayStation 2 similar to Action Replay, GameShark, and CodeBreaker.
Stars: ✭ 64 (+255.56%)
Mutual labels:  game-hacking, ps2
docker-ps2dev
A Docker Image for PS2 Development
Stars: ✭ 19 (+5.56%)
Mutual labels:  homebrew, ps2
homebrew-pythons
🍺🐍 A Hombrew Tap literally filled with Python Interpreters.
Stars: ✭ 20 (+11.11%)
Mutual labels:  homebrew
crc32c
Fast CRC-32-Castagnoli implementation in Rust
Stars: ✭ 26 (+44.44%)
Mutual labels:  rust-library
dotfiles
Automatic machine configurator using Ansible
Stars: ✭ 13 (-27.78%)
Mutual labels:  homebrew
pvcollib
PVColLib: A small, open and free development kit for the Colecovision
Stars: ✭ 16 (-11.11%)
Mutual labels:  homebrew
dotfiles
My dotfiles
Stars: ✭ 22 (+22.22%)
Mutual labels:  homebrew
libmem
Advanced Game Hacking Library for C/C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External)
Stars: ✭ 336 (+1766.67%)
Mutual labels:  game-hacking
homebrew-amiga
A repository for Amiga Development related brews
Stars: ✭ 21 (+16.67%)
Mutual labels:  homebrew
contour-rs
Contour polygon creation in Rust (using marching squares algorithm)
Stars: ✭ 33 (+83.33%)
Mutual labels:  rust-library
ComicNX
NSFW comic browser for the Nintendo Switch
Stars: ✭ 15 (-16.67%)
Mutual labels:  homebrew
twitter-stream-rs
A Rust library for listening on Twitter Streaming API.
Stars: ✭ 66 (+266.67%)
Mutual labels:  rust-library
tobutobugirl-dx
An arcade platformer homebrew game for the Game Boy, Game Boy Color and Super Game Boy
Stars: ✭ 58 (+222.22%)
Mutual labels:  homebrew
colorful
Make your terminal output colorful.
Stars: ✭ 43 (+138.89%)
Mutual labels:  rust-library
arangors
Easy to use rust driver for arangoDB
Stars: ✭ 120 (+566.67%)
Mutual labels:  rust-library
rust-phonenumber
Library for parsing, formatting and validating international phone numbers.
Stars: ✭ 99 (+450%)
Mutual labels:  rust-library
vfin
🦈 GUI framework agnostic virtual DOM library
Stars: ✭ 17 (-5.56%)
Mutual labels:  rust-library
homebrew-apple-fonts
Easily install Apples fonts using homebrew.
Stars: ✭ 12 (-33.33%)
Mutual labels:  homebrew
dotfiles
This is a dotfiles repository created and maintained by @erdaltsksn. It contains a collection of `.files`.
Stars: ✭ 16 (-11.11%)
Mutual labels:  homebrew

codebreaker-rs

Latest version Documentation CI

A Rust library to decrypt & encrypt any cheat code for CodeBreaker PS2.

Originally reverse-engineered from MIPS R5900 assembly and converted to C in 2006. Now ported to Rust for fun and profit.

For more information, check out my article on 7 Things I Learned From Porting a C Crypto Library to Rust.

Quickstart

Add the crate as a dependency to your Cargo.toml:

[dependencies]
codebreaker = "0.3"

Now you can start decrypting some codes:

use codebreaker::Codebreaker;

let input: Vec<(u32, u32)> = vec![
    (0x2043AFCC, 0x2411FFFF),
    (0x2A973DBD, 0x00000000),
    (0xB4336FA9, 0x4DFEFB79),
    (0x973E0B2A, 0xA7D4AF10),
];
let output: Vec<(u32, u32)> = vec![
    (0x2043AFCC, 0x2411FFFF),
    (0x201F6024, 0x00000000),
    (0xBEEFC0DE, 0x00000000),
    (0x2096F5B8, 0x000000BE),
];

let mut cb = Codebreaker::new();
for (i, code) in input.iter().enumerate() {
    assert_eq!(cb.auto_decrypt_code(code.0, code.1), output[i]);
}

Read the full documentation for more examples.

no_std support

The codebreaker crate has a Cargo feature named "std" that is enabled by default. In order to use the crate on embedded systems, this feature needs to be disabled:

[dependencies]
codebreaker = { version = "0.3", default-features = false }

License

Copyright (c) 2020-2022 Mathias Lafeldt

Licensed under the Apache License, Version 2.0 or the MIT license, at your option.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].