summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2015-03-15 14:29:13 -0400
committerJesse Luehrs <doy@tozt.net>2015-03-15 14:29:13 -0400
commit02060997940fca2275d56b7d406202e88bc0e320 (patch)
treee56b988809be5a949999f4eea9d9cb3a97dbd620
parent57b66ba59faf95d98d829874be114bea095e7e31 (diff)
downloadmatasano-02060997940fca2275d56b7d406202e88bc0e320.tar.gz
matasano-02060997940fca2275d56b7d406202e88bc0e320.zip
adjust the english letter frequencies a bit
http://norvig.com/mayzner.html
-rw-r--r--src/lib.rs50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 40abaad..0a69230 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -6,32 +6,32 @@ use std::num::Float;
use serialize::base64::{ToBase64,STANDARD};
const ENGLISH_FREQUENCIES: [f64; 26] = [
- 0.0812,
- 0.0149,
- 0.0271,
- 0.0432,
- 0.1202,
- 0.0230,
- 0.0203,
- 0.0592,
- 0.0731,
- 0.0010,
- 0.0069,
- 0.0398,
- 0.0261,
- 0.0695,
- 0.0768,
- 0.0182,
- 0.0011,
- 0.0602,
+ 0.0804,
+ 0.0148,
+ 0.0334,
+ 0.0382,
+ 0.1249,
+ 0.0240,
+ 0.0187,
+ 0.0505,
+ 0.0757,
+ 0.0016,
+ 0.0054,
+ 0.0407,
+ 0.0251,
+ 0.0723,
+ 0.0764,
+ 0.0214,
+ 0.0012,
0.0628,
- 0.0910,
- 0.0288,
- 0.0111,
- 0.0209,
- 0.0017,
- 0.0211,
- 0.0007,
+ 0.0651,
+ 0.0928,
+ 0.0273,
+ 0.0105,
+ 0.0168,
+ 0.0023,
+ 0.0166,
+ 0.0009,
];
pub fn to_base64 (bytes: &[u8]) -> String {