提交 908eb7b8 编写于 作者: U Ulf Möller

Call our crypt implementation des_crypt(). crypt() now is a wrapper if

there is no system crypt() available.
上级 bf0870ac
......@@ -5,6 +5,9 @@
Changes between 0.9.3a and 0.9.4
*) DES library cleanups.
[Ulf Möller]
*) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be
used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit
ciphers. NOTE: although the key derivation function has been verified
......
......@@ -198,16 +198,9 @@ int des_enc_read(int fd,void *buf,int len,des_key_schedule sched,
int des_enc_write(int fd,const void *buf,int len,des_key_schedule sched,
des_cblock *iv);
char *des_fcrypt(const char *buf,const char *salt, char *ret);
#if defined(PERL5) || defined(__FreeBSD__)
char *des_crypt(const char *buf,const char *salt);
#else
/* some stupid compilers complain because I have declared char instead
* of const char */
#ifdef HEADER_DES_LOCL_H
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT)
char *crypt(const char *buf,const char *salt);
#else
char *crypt();
#endif
#endif
void des_ofb_encrypt(const unsigned char *in,unsigned char *out,int numbits,
long length,des_key_schedule schedule,des_cblock *ivec);
......
......@@ -62,16 +62,14 @@ static unsigned const char cov_2char[64]={
void fcrypt_body(DES_LONG *out,des_key_schedule ks,
DES_LONG Eswap0, DES_LONG Eswap1);
#if defined(PERL5) || defined(__FreeBSD__)
char *des_crypt(const char *buf,const char *salt);
#else
char *crypt(const char *buf,const char *salt);
#endif
#if defined(PERL5) || defined(__FreeBSD__)
char *des_crypt(const char *buf, const char *salt)
#else
#if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT)
char *crypt(const char *buf, const char *salt)
{
return(des_crypt(buf, salt));
}
#endif
char *des_crypt(const char *buf, const char *salt)
{
static char buff[14];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册