From d261323f69f650fc50516fe2e36991d902b9d2e1 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Tue, 11 Oct 2016 09:40:46 +0200 Subject: Cleanup --- envelope.cpp | 5 ++++- envelope/gcdtest.sh | 21 --------------------- 2 files changed, 4 insertions(+), 22 deletions(-) delete mode 100755 envelope/gcdtest.sh diff --git a/envelope.cpp b/envelope.cpp index 33ac8c4..4971358 100644 --- a/envelope.cpp +++ b/envelope.cpp @@ -1,12 +1,15 @@ #include #include #include "aes.h" -#include "base64.h" //TODO: remove #include "envelope.h" #include "rng.h" #undef DEBUG +#ifdef DEBUG +#include "base64.h" +#endif + using namespace std; namespace Envelope{ diff --git a/envelope/gcdtest.sh b/envelope/gcdtest.sh deleted file mode 100755 index be6ff7e..0000000 --- a/envelope/gcdtest.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -function go() { - keylen="$1" - total="$2" - for i in $(seq 1 "$total"); do - ./envelope -k "$keylen" 2>&1 | head -1 | cut -d' ' -f3 | outerr - done | sort -n | uniq -c | head -1 | awk '{print $1}' -} - -function percentage() { - printf "%d bits, %d trials: %s%% 2's\n" "$1" "$2" "$(bc <<<"100*$(go $1 $2)/$2")" -} - -percentage "$1" "$2" - -#percentage 512 20 -#percentage 700 20 -#percentage 900 20 -#percentage 1024 10 -#percentage 1400 10 -#percentage 2048 10 -- cgit v1.2.3-70-g09d2