Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add an option to use litcrypt in constants/statics #4

Closed
ph0llux opened this issue Mar 23, 2021 · 1 comment
Closed

Comments

@ph0llux
Copy link

ph0llux commented Mar 23, 2021

It would be a very nice feature, to do something like this:

#[macro_use]
extern crate litcrypt;

use_litcrypt!("MY-SECRET-SPELL");

const VOLDEMORT: &str = &lc!("Voldemort");

fn main(){
    println!("his name is: {}", VOLDEMORT);
}
@anvie
Copy link
Owner

anvie commented Mar 24, 2021

It's not possible to use const as the litcrypt need to decode string on-the-fly during runtime.

@anvie anvie closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants