File: twofish.h

package info (click to toggle)
libcrypt-twofish-perl 2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 96 kB
  • ctags: 61
  • sloc: ansic: 298; perl: 263; makefile: 15
file content (24 lines) | stat: -rw-r--r-- 690 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * $Id: twofish.h,v 2.12 2001/05/21 17:38:01 ams Exp $
 * Copyright 2001 Abhijit Menon-Sen <ams@wiw.org>
 */

#include <stdlib.h>
#include "platform.h"

#ifndef _TWOFISH_H_
#define _TWOFISH_H_

struct twofish {
    int len;                    /* Key length in 64-bit units: 2, 3 or 4 */
    uint32_t K[40];             /* Expanded key                          */
    uint32_t S[4][256];         /* Key-dependent S-boxes                 */
};

struct twofish *twofish_setup(unsigned char *key, int len);
void twofish_free(struct twofish *self);
void twofish_crypt(struct twofish *t,
                   unsigned char *input, unsigned char *output,
                   int decrypt);

#endif