A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 105 lines 3.0 kB view raw
1/* LibTomCrypt, modular cryptographic library -- Tom St Denis 2 * 3 * LibTomCrypt is a library that provides various cryptographic 4 * algorithms in a highly modular and flexible manner. 5 * 6 * The library is free for all purposes without any express 7 * guarantee it works. 8 */ 9 10#ifndef TOMCRYPT_H_ 11#define TOMCRYPT_H_ 12#include <assert.h> 13#include <stdio.h> 14#include <string.h> 15#include <stdlib.h> 16#include <stddef.h> 17#include <time.h> 18#include <ctype.h> 19#include <limits.h> 20 21/* use configuration data */ 22#include <tomcrypt_custom.h> 23 24#ifdef __cplusplus 25extern "C" { 26#endif 27 28/* version */ 29#define CRYPT 0x0118 30#define SCRYPT "1.18.2" 31 32/* max size of either a cipher/hash block or symmetric key [largest of the two] */ 33#define MAXBLOCKSIZE 128 34 35#ifndef TAB_SIZE 36/* descriptor table size */ 37#define TAB_SIZE 32 38#endif 39 40/* error codes [will be expanded in future releases] */ 41enum { 42 CRYPT_OK=0, /* Result OK */ 43 CRYPT_ERROR, /* Generic Error */ 44 CRYPT_NOP, /* Not a failure but no operation was performed */ 45 46 CRYPT_INVALID_KEYSIZE, /* Invalid key size given */ 47 CRYPT_INVALID_ROUNDS, /* Invalid number of rounds */ 48 CRYPT_FAIL_TESTVECTOR, /* Algorithm failed test vectors */ 49 50 CRYPT_BUFFER_OVERFLOW, /* Not enough space for output */ 51 CRYPT_INVALID_PACKET, /* Invalid input packet given */ 52 53 CRYPT_INVALID_PRNGSIZE, /* Invalid number of bits for a PRNG */ 54 CRYPT_ERROR_READPRNG, /* Could not read enough from PRNG */ 55 56 CRYPT_INVALID_CIPHER, /* Invalid cipher specified */ 57 CRYPT_INVALID_HASH, /* Invalid hash specified */ 58 CRYPT_INVALID_PRNG, /* Invalid PRNG specified */ 59 60 CRYPT_MEM, /* Out of memory */ 61 62 CRYPT_PK_TYPE_MISMATCH, /* Not equivalent types of PK keys */ 63 CRYPT_PK_NOT_PRIVATE, /* Requires a private PK key */ 64 65 CRYPT_INVALID_ARG, /* Generic invalid argument */ 66 CRYPT_FILE_NOTFOUND, /* File Not Found */ 67 68 CRYPT_PK_INVALID_TYPE, /* Invalid type of PK key */ 69 70 CRYPT_OVERFLOW, /* An overflow of a value was detected/prevented */ 71 72 CRYPT_UNUSED1, /* UNUSED1 */ 73 74 CRYPT_INPUT_TOO_LONG, /* The input was longer than expected. */ 75 76 CRYPT_PK_INVALID_SIZE, /* Invalid size input for PK parameters */ 77 78 CRYPT_INVALID_PRIME_SIZE,/* Invalid size of prime requested */ 79 CRYPT_PK_INVALID_PADDING, /* Invalid padding on input */ 80 81 CRYPT_HASH_OVERFLOW /* Hash applied to too many bits */ 82}; 83 84#include <tomcrypt_cfg.h> 85#include <tomcrypt_macros.h> 86#include <tomcrypt_cipher.h> 87#include <tomcrypt_hash.h> 88#include <tomcrypt_mac.h> 89#include <tomcrypt_prng.h> 90#include <tomcrypt_pk.h> 91#include <tomcrypt_math.h> 92#include <tomcrypt_misc.h> 93#include <tomcrypt_argchk.h> 94#include <tomcrypt_pkcs.h> 95 96#ifdef __cplusplus 97 } 98#endif 99 100#endif /* TOMCRYPT_H_ */ 101 102 103/* ref: HEAD -> master, tag: v1.18.2 */ 104/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */ 105/* commit time: 2018-07-01 22:49:01 +0200 */