Skip to content

Latest commit

 

History

History
 
 

Compile_Encrypt_String

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Encrypting strings at compile time 🦀

Overview

This project focuses on demonstrating how you can encrypt strings at compile time and decrypt them at runtime.

The project is just a starting point for you to improve the project and implement cryptography that you find interesting. In this example, I'm focusing on XOR, but use it however you prefer.

Usage

In the "usage_lib" directory I demonstrate how to use the code, but you can implement this line in your Cargo.toml:

encrypt_string = { path = "../encrypt_string" }

Then call it in your code:

use encrypt_string::encrypt_string;

fn main() {
    let nome = encrypt_string!("I'm encrypted!");
    println!("{}", nome);
}

References