Crates.io | crypto-literal |
lib.rs | crypto-literal |
version | 0.1.1 |
source | src |
created_at | 2020-03-24 19:45:52.102363 |
updated_at | 2020-03-24 19:45:52.102363 |
description | Crypto literal procedural macros. |
homepage | https://crates.io/crates/crypto-literal |
repository | https://github.com/kgv/crypto-literal |
max_upload_size | |
id | 222406 |
size | 18,478 |
This crate has POC (Proof Of Concept) status!
First add crypto-literal
crate to your Cargo.toml
:
[dependencies]
crypto-literal = "0.1"
Now you can write the following code:
#![feature(proc_macro_hygiene)]
use crypto_literal::encrypt;
let crypto_literal = encrypt!("The quick brown fox jumps over the lazy dog.");
or:
#![feature(proc_macro_hygiene)]
use crypto_literal::{encrypt, CryptoLiteral};
use lazy_static::lazy_static;
lazy_static! {
static ref CRYPTO_LITERAL: CryptoLiteral<str> =
encrypt!("The quick brown fox jumps over the lazy dog.");
}