add crypt_des header for declarations shared with encrypt function

This commit is contained in:
Rich Felker
2018-09-12 14:34:33 -04:00
parent 4de46b5ab5
commit 7ab1578d05
3 changed files with 16 additions and 12 deletions
+1 -3
View File
@@ -56,9 +56,7 @@
#include <stdint.h>
#include <string.h>
struct expanded_key {
uint32_t l[16], r[16];
};
#include "crypt_des.h"
#define _PASSWORD_EFMT1 '_'
+14
View File
@@ -0,0 +1,14 @@
#ifndef CRYPT_DES_H
#define CRYPT_DES_H
#include <stdint.h>
struct expanded_key {
uint32_t l[16], r[16];
};
void __des_setkey(const unsigned char *, struct expanded_key *);
void __do_des(uint32_t, uint32_t, uint32_t *, uint32_t *,
uint32_t, uint32_t, const struct expanded_key *);
#endif
+1 -9
View File
@@ -2,15 +2,7 @@
#include <stdlib.h>
#include <unistd.h>
struct expanded_key {
uint32_t l[16], r[16];
};
void __des_setkey(const unsigned char *key, struct expanded_key *ekey);
void __do_des(uint32_t l_in, uint32_t r_in,
uint32_t *l_out, uint32_t *r_out,
uint32_t count, uint32_t saltbits, const struct expanded_key *ekey);
#include "crypt_des.h"
static struct expanded_key __encrypt_key;