in reply to Re^3: Non-Formula based Text Encoding - with Compression
in thread Non-Formula based Text Encoding - with Compression

My guess is this is "non-formula" in that there is a lookup instead of evaluating a function that uses the plaintext contents. Excessively simple example of Caesar cipher:

$plaintext = 'Attack at dawn!'; # formula - very simple encoding function foreach $chr (split //,$plaintext) { $ciphertext .= chr(ord($chr)+1) } print $ciphertext,"\n"; $ciphertext = ''; # non-formula # only need to do this next step once, then store hash somewhere to us +e when encoding foreach $letter ('A'..'Z','a'..'z',' ','!') { $shifted{$letter} = chr(ord($letter)+1) } foreach $chr(split //,$plaintext) { $ciphertext .= $shifted{$chr} } print $ciphertext, "\n";
Dum Spiro Spero