#literals #algorithm #aes #xor #crypto #procedural #macro

crypto-literal-algorithm

Crypto literal procedural macros algorithm

2 releases

0.1.1 Mar 24, 2020
0.1.0 Mar 24, 2020

#31 in #xor


Used in 2 crates

MIT/Apache

4KB
57 lines

Crypto literal library

This crate has POC (Proof Of Concept) status!

Supported algorithms

  • Aes
  • Xor

Usage

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.");
}

Dependencies

~605KB
~14K SLoC