" -p | --pass-fd <num> read passphrase from file descriptor <num>\n"
" -r | --read-only setup read-only loop device\n"
" --show print device name (with -f <file>)\n"
+ " -N | --nohashpass Do not hash the given password (Debian hashes)\n"
+ " -k | --keybits <num> specify number of bits in the hashed key given\n"
+ " to the cipher. Some ciphers support several key\n"
+ " sizes and might be more efficient with a smaller\n"
+ " key size. Key sizes < 128 are generally not\n"
+ " recommended\n"
" -v | --verbose verbose mode\n\n"));
- exit(1);
+
+ exit(f == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
int
case 'f':
find = 1;
break;
+ case 'h':
+ usage(stdout);
+ break;
case 'j':
assoc = optarg;
+ case 'k':
+ keysize = optarg;
+ break;
+ case 'N':
+ hash_pass = 0;
break;
case 'o':
offset = optarg;
res = show_loop(device);
else {
if (passfd && sscanf(passfd, "%d", &pfd) != 1)
- usage();
+ usage(stderr);
+ if (keysize && sscanf(keysize,"%d",&keysz) != 1)
- usage();
++ usage(stderr);
do {
- res = set_loop(device, file, off, slimit, encryption, pfd, &ro);
+ res = set_loop(device, file, off, slimit, encryption, pfd, &ro, keysz, hash_pass);
if (res == 2 && find) {
if (verbose)
printf(_("stolen loop=%s...trying again\n"),