mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Merge
This commit is contained in:
commit
19efd6fba8
2 changed files with 21 additions and 16 deletions
|
@ -33,9 +33,9 @@ ENDIF(MSVC)
|
|||
# Set PCH_FLAGS for common flags, PCH_ARCH_XXX_FLAGS for specific archs flags and PCH_ARCHS for archs
|
||||
MACRO(PCH_SET_COMPILE_FLAGS _target)
|
||||
SET(PCH_FLAGS)
|
||||
SET(PCH_ARCHS)
|
||||
|
||||
SET(FLAGS)
|
||||
SET(PCH_ARCHS)
|
||||
SET(_FLAGS)
|
||||
|
||||
LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS})
|
||||
|
||||
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
|
||||
|
@ -81,10 +81,15 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
|
|||
LIST(APPEND _FLAGS " ${_directory_flags}")
|
||||
LIST(APPEND _FLAGS " ${_directory_definitions}")
|
||||
|
||||
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
|
||||
|
||||
# Format definitions
|
||||
SEPARATE_ARGUMENTS(_FLAGS)
|
||||
IF(MSVC)
|
||||
# Fix path with space
|
||||
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
|
||||
ELSE(MSVC)
|
||||
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
|
||||
SEPARATE_ARGUMENTS(_FLAGS)
|
||||
ENDIF(MSVC)
|
||||
|
||||
|
||||
IF(CLANG)
|
||||
# Determining all architectures and get common flags
|
||||
|
|
|
@ -79,6 +79,10 @@ static char rz_sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93";
|
|||
#include <limits.h>
|
||||
#define RZ__PASSWORD_EFMT1 '-'
|
||||
|
||||
#if DEBUG_CRYPT
|
||||
void prtab(char *s, unsigned char *t, int num_rows);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* UNIX password, and DES, encryption.
|
||||
* By Tom Truscott, trt@rti.rti.org,
|
||||
|
@ -785,7 +789,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
|
|||
}
|
||||
perm[i] = (unsigned char) k;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_CRYPT
|
||||
prtab("pc1tab", perm, 8);
|
||||
#endif
|
||||
rz_init_perm(PC1ROT, perm, 8, 8);
|
||||
|
@ -809,7 +813,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
|
|||
if ((k%28) <= j) k -= 28;
|
||||
perm[i] = pc2inv[k];
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_CRYPT
|
||||
prtab("pc2tab", perm, 8);
|
||||
#endif
|
||||
rz_init_perm(PC2ROT[j], perm, 8, 8);
|
||||
|
@ -833,7 +837,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
|
|||
perm[i*8+j] = (unsigned char) k;
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_CRYPT
|
||||
prtab("ietab", perm, 8);
|
||||
#endif
|
||||
rz_init_perm(IE3264, perm, 4, 8);
|
||||
|
@ -850,7 +854,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
|
|||
}
|
||||
perm[k-1] = i+1;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_CRYPT
|
||||
prtab("cftab", perm, 8);
|
||||
#endif
|
||||
rz_init_perm(CF6464, perm, 8, 8);
|
||||
|
@ -959,12 +963,8 @@ int rz_encrypt(register char *block, int flag) {
|
|||
return (0);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
STATIC
|
||||
prtab(s, t, num_rows)
|
||||
char *s;
|
||||
unsigned char *t;
|
||||
int num_rows;
|
||||
#ifdef DEBUG_CRYPT
|
||||
void prtab(char *s, unsigned char *t, int num_rows)
|
||||
{
|
||||
register int i, j;
|
||||
|
||||
|
|
Loading…
Reference in a new issue