Download | Plain Text | No Line Numbers
- #ifdef NDEBUG
- # undef NDEBUG
- #endif
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <assert.h>
- #include "hexdump.h"
- #include "cipher.h"
-
- #define BLOCKSIZE 8192
-
- int main()
- {
- /* allocate buffer for decrypted stuff */
-
- /* cipher */
- int ret = CipherInit(cipher);
-
- /* set pointer to output buffer */
- cipher->out = out;
- hex_dump(cipher, sizeof(ctx_t));
-
- /* some sanity checks */
-
- /* allocate input buffer */
- uint32_t in_len = 0;
-
- /* copy test data
- * encrypted data for:
- * #73'cgy5l%~cn*=tjb[go),:{(@yx
- * print $Confixx::Filter::VERSION,"\n";
- */
- unsigned char test[] = {
- 0xd8, 0xb0, 0x73, 0x62, 0xc2, 0xf8, 0x17, 0x92, 0x8c, 0x68, 0x5f,
- 0xf5, 0x8e, 0x25, 0x66, 0x37, 0x43, 0x34, 0x92, 0xfa, 0x94, 0xc5, 0x26,
- 0xb4, 0x1c, 0x16, 0xa8, 0x2c, 0x1c, 0x8e, 0xa3, 0x37, 0x42, 0xf6, 0xb2,
- 0x62, 0x90, 0xd3, 0x99, 0xa7, 0x9d, 0x80, 0x16, 0x7f, 0x2d, 0x1c, 0xf7,
- 0x9d, 0xf0, 0xee, 0xbc, 0xaa, 0xa0, 0x66, 0xc3, 0xb1, 0xdc, 0x7a, 0xda,
- 0xda, 0xbc, 0x95, 0x4c, 0x88, 0xe6, 0x6f, 0x4d
- };
- in_len = sizeof(test);
-
-
- uint32_t out_len = CipherUpdate(cipher, in, in_len);
- hex_dump(cipher, sizeof(ctx_t));
-
- /* some afterwards sanit checks */
-
-
-
- return 0;
- }
-