fis.close();
}
}
-
+
@After
public void restoreStreams() throws IOException {
System.setOut(System.out);
String filePath = "test/output_key";
File testDir = new File("test");
- if(!testDir.exists()) {
+ if (!testDir.exists()) {
testDir.mkdirs();
}
CmdLine.main(new String[]{"keygen", filePath});
CmdLine.main(new String[]{"passgen", String.valueOf(length)});
output = outContent.toString().trim();
assertThat(output.length(), is(length));
-
+
length = 5;
outContent.reset();
CmdLine.main(new String[]{"passgen", String.valueOf(length)});
" digest [<passwd>|-i|] <keyfile> (Encrypts Password with \"keyfile\"" + lineSeparator +
" if passwd = -i, will read StdIn" + lineSeparator +
" if passwd is blank, will ask securely)" + lineSeparator +
+ " undigest <enc:...> <keyfile> (Decrypts Encoded with \"keyfile\")" + lineSeparator +
" passgen <digits> (Generate Password of given size)" + lineSeparator +
" urlgen <digits> (Generate URL field of given size)" + lineSeparator +
" encode64 <your text> (Encodes to Base64)" + lineSeparator +