Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- This file is part of The Labnix Cryptography Library.
- The Labnix Cryptography Library is free software: you can redistribute
- it and/or modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation, either version 3 of
- the License, or (at your option) any later version.
- The Labnix Cryptography Library 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 General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with The Labnix Cryptography Library. If not, see
- <http://www.gnu.org/licenses/>.
- */
- #ifndef CRYPTO_H
- #define CRYPTO_H
- #include <ctype.h>
- #include <sys/types.h>
- #include <inttypes.h>
- typedef int BASE;
- enum {
- BASE_16 = 16,
- BASE_64 = 64,
- BYTE = 8,
- MAXLINE = 4096,
- MAX_UNPRINTABLE = 0
- };
- struct ca { /* character analysis */
- float total, punct, alpha, digit, vowel, e ,t;
- };
- /* convert.c */
- size_t blen(const char *s, BASE n);
- size_t slen(int blen, BASE n);
- uint8_t *decode(uint8_t *raw, const char *estr, BASE n);
- char *encode(char *estr, const uint8_t *raw, size_t len, BASE n);
- /* xor.c */
- uint8_t *xor(uint8_t *buf, size_t blen, const uint8_t *key, size_t klen);
- void xorb(uint8_t *raw, size_t n, int c);
- void filter( uint8_t *raw, size_t n, struct ca *min, struct ca *max); /* filter.c */
- #endif /* CRYPTO_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement