ajout crypto
This commit is contained in:
17
crypto/TP2/spn.h
Normal file
17
crypto/TP2/spn.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _SPN_H
|
||||
#define _SPN_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
unsigned char do_perm(unsigned char w, unsigned char perm[8]);
|
||||
unsigned char do_subst(unsigned char w, unsigned char subst[16]);
|
||||
unsigned char encrypt(unsigned char w, unsigned short key, unsigned char perm[8], unsigned char subst[16]);
|
||||
unsigned char decrypt(unsigned char w, unsigned short key, unsigned char perm[8], unsigned char subst[16]);
|
||||
|
||||
// Ajout des déclarations des fonctions de lecture
|
||||
void read_key(const char *filename, unsigned short *key);
|
||||
void read_subst(const char *filename, unsigned char subst[16]);
|
||||
void read_perm(const char *filename, unsigned char perm[8]);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user