2 unstable releases
0.2.0 | Oct 12, 2020 |
---|---|
0.1.0 | Oct 11, 2020 |
#1236 in Cryptography
33KB
804 lines
Brainfuck™ Encoding
use crypto_brainfuck::encode;
#[test]
fn test() {
let out = encode("Hello, World!");
let target = "-[++[<++>->+++>+++<<]---->+]<<<<.<<<<-.<..<<+.<<<<.>>.>>>-.<.+++.>>.>-.<<<<<+.";
assert_eq!(out.replace("\n",""), target)
}
If there are 14 consecutive +
or -
signs, then this is a bad case of the algorithm.
See: Brainfuck constants
Some other: https://copy.sh/brainfuck/text.html
Dependencies
~8KB