1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,15 @@ |
1 |
+#include <stdio.h> |
|
2 |
+#include <stdlib.h> |
|
3 |
+ |
|
4 |
+#include <unistd.h> |
|
5 |
+#include <crypt.h> |
|
6 |
+ |
|
7 |
+int main(int argc, char * argv[]) |
|
8 |
+{ |
|
9 |
+ puts(crypt(getpass("Password: "), crypt_gensalt( |
|
10 |
+ argc >= 2 ? argv[1] : NULL, |
|
11 |
+ argc >= 3 ? atoi(argv[2]) : 0, |
|
12 |
+ NULL, |
|
13 |
+ 0 |
|
14 |
+ ))); |
|
15 |
+} |