MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / main

Method main

java/src/cx/fbn/encrypt/Crypto.java:10–33  ·  view source on GitHub ↗

@param args

(String[] args)

Source from the content-addressed store, hash-verified

8 * @param args
9 */
10 public static void main(String[] args) {
11 EnCrypt encrypt = new EnCrypt();
12
13 if (args.length != 4)
14 System.exit(16);
15
16 String function = args[0];
17 String password = args[1];
18 String keylen = args[2];
19 String text = args[3];
20
21 String result = "";
22 if (function.equalsIgnoreCase("encrypt-rc2"))
23 result = encrypt.encryptRC2(text, password, Integer.parseInt(keylen));
24 else if (function.equalsIgnoreCase("decrypt-rc2"))
25 result = encrypt.decryptRC2(text, password, Integer.parseInt(keylen));
26 else
27 System.exit(14);
28
29 if (result.equals(""))
30 System.exit(4);
31
32 System.out.print(result);
33 }
34}

Callers

nothing calls this directly

Calls 2

encryptRC2Method · 0.95
decryptRC2Method · 0.95

Tested by

no test coverage detected