Subversion Repositories MLServ

Rev

Rev 5 | Rev 7 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 6
Line 1... Line 1...
1
/* $Id: crypt.c 5 2024-09-25 00:19:35Z nishi $ */
1
/* $Id: crypt.c 6 2024-09-25 00:20:21Z nishi $ */
2
 
2
 
3
#include "cm_crypt.h"
3
#include "cm_crypt.h"
4
 
4
 
5
#include <unistd.h>
5
#include <unistd.h>
6
#include <stdio.h>
6
#include <stdio.h>
7
#include <stdlib.h>
7
#include <stdlib.h>
8
#include <string.h>
8
#include <string.h>
9
 
9
 
-
 
10
#ifdef __linux__
-
 
11
#include <crypt.h>
-
 
12
#endif
-
 
13
 
10
const char* cm_crypt_methods[] = {"DES", "MD5", "Blowfish", "", "", "SHA-256", "SHA-512"};
14
const char* cm_crypt_methods[] = {"DES", "MD5", "Blowfish", "", "", "SHA-256", "SHA-512"};
11
 
15
 
12
char* cm_crypt_spec(int num, const char* string, const char* salt) {
16
char* cm_crypt_spec(int num, const char* string, const char* salt) {
13
	char* r = NULL;
17
	char* r = NULL;
14
	if(num == C_DES) {
18
	if(num == C_DES) {