Created
September 20, 2012 03:18
-
-
Save youhey/3753772 to your computer and use it in GitHub Desktop.
cryptライブラリの動作確認
This file contains 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 <crypt.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) | |
{ | |
if (argc < 3) { | |
fprintf(stderr, "%s [string] [salt]\n", argv[0]); | |
exit(1); | |
} | |
char *input = argv[1]; | |
char *salt = argv[2]; | |
char *crypted = crypt(input, salt); | |
printf("%s\n", crypted); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment