Last active
August 12, 2021 02:56
-
-
Save fjrti/2cca25c35281ccd081d6aaf2ba5d65a0 to your computer and use it in GitHub Desktop.
crypt加密
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#define _XOPEN_SOURCE | |
int main(void) | |
{ | |
char *passwd; | |
char key[] = "123456"; | |
passwd = crypt(key, "$6$y9cP0qlmDYgBk6OZ$"); | |
printf("password: %s\n", passwd); | |
return 0; | |
} | |
/* Link with -lcrypt */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment