From 69561846718c0abacdb8edd1d41f4a421f87d955 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 17 Jun 2020 17:47:54 -0400 Subject: Remove aes --- bin/aes.c | 57 --------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 bin/aes.c (limited to 'bin/aes.c') diff --git a/bin/aes.c b/bin/aes.c deleted file mode 100644 index 705970dc..00000000 --- a/bin/aes.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2019 C. McEnroe - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include - -typedef unsigned char byte; - -static const wchar_t Table[128] = { - L"\x00\x01\x02\x03\x04\x05\x06\x07" - L"\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" - L"\x10\x11\x12\x13\x14\x15\x16\x17" - L"\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F" - L" !"#$%&'()*+,-./" - L"0123456789:;<=>?" - L"@ABCDEFGHIJKLMNO" - L"PQRSTUVWXYZ[\]^_" - L"`abcdefghijklmno" - L"pqrstuvwxyz{|}~\x7F" -}; - -static void enwiden(const char *ch) { - for (; *ch; ++ch) { - if ((byte)*ch < 128) printf("%lc", (wint_t)Table[(byte)*ch]); - else printf("%c", *ch); - } -} - -int main(int argc, char *argv[]) { - setlocale(LC_CTYPE, ""); - for (int i = 1; i < argc; ++i) { - enwiden(argv[i]); - if (i < argc - 1) printf("%lc", (wint_t)Table[' ']); - else printf("\n"); - } - if (argc > 1) return EXIT_SUCCESS; - char *line = NULL; - size_t cap = 0; - while (0 < getline(&line, &cap, stdin)) { - enwiden(line); - } -} -- cgit 1.4.1