Skip to content

Instantly share code, notes, and snippets.

@youhey
Created September 20, 2012 03:18
Show Gist options
  • Save youhey/3753772 to your computer and use it in GitHub Desktop.
Save youhey/3753772 to your computer and use it in GitHub Desktop.
cryptライブラリの動作確認
#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