sceptic
Forum Supporter
I certainly am, but was looking for a command line (scriptable) solution, preferably from a Windows batch file.Are you not aware of the native Windows solution?:
I certainly am, but was looking for a command line (scriptable) solution, preferably from a Windows batch file.Are you not aware of the native Windows solution?:
Are you not aware of the native Windows solution?:
[expletive deleted]! And I thought I was being helpful by producing a GUI.I certainly am, but was looking for a command line (scriptable) solution, preferably from a Windows batch file.
You'd think so. But using the GUI I didn't have to worry about command line switches. Biggest problem might be the use of Java (as prpr will probably say - it's ). I used it because I don't have (or can't use) an up-to-date C/C++ with the necessary libraries that allow a very simple call to a pre-defined decryption routine. I tried looking for an algorithm, function or library on t'net but have yet to find a suitable one. If I do, I might look into a command line version in C. Absolutely no promises on that one. Don't fancy doing a command line version in Java - I think the command would be too complicated, perhaps:I guess it would be easy enough to provide a command line version, @EEPhil ?
java -jar HFODUL.jar -k 000378bd11f336333731303434393630 -f "800 Words_20180418_1434" -o "800 Words_20180418_1434_dec"
Can you say which decryption libraries you would need please?I don't have (or can't use) an up-to-date C/C++ with the necessary libraries that allow a very simple call to a pre-defined decryption routine.
Not easily. I only know the calls I have to use in Java. In the C I have there are no decryption functions at all.Can you say which decryption libraries you would need please?
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
...
private final byte[] key; // Decryption key
private byte[] tsPacket; // 188 byte standard .ts packet
private Cipher cipher;
...
cipher = Cipher.getInstance("DESede/ECB/NoPadding");
cipher.init(Cipher.DECRYPT_MODE,new SecretKeySpec(key, "DESede"));
...
// encrypt_start (int) is offset into tsPacket where encrypted bytes start
// encrypt_length (int) is number of bytes of encrypted data
byte[] decryptedBytes = cipher.doFinal(tsPacket, encrypt_start, encrypt_length);
I assume you are looking for 3DES functionality. I doubt that is built in but you could always get this via a 3rd party library (see HERE for example)I used it because I don't have (or can't use) an up-to-date C/C++ with the necessary libraries that allow a very simple call to a pre-defined decryption routine
You were! I am probably a bit weird in that I'm a Windows guy but I prefer the command line where possible. I have a large number of archived recordings over several network mounted locations that does contain the odd encrypted file. With a command line version I could then easily knock up a script to traverse all those recordings, identify the encrypted ones and decode them in place.[expletive deleted]! And I thought I was being helpful by producing a GUI.
I came from a command line background and resisted GUIs for a long time. I mean who talks to a computer with a mouse?I'm a Windows guy but I prefer the command line where possible.
It depends what you're trying to do. GUIs are great for some things, but are hopeless for automation. CLIs are great for automation, once you know what you are doing. The ideal is to have both.[expletive deleted]! And I thought I was being helpful by producing a GUI.
Thanks for that! I have only given it a quick test so far but it looks like its working as expected. I'll do some more in depth testing later....
That's the problem! I'm not sure that I do.It depends what you're trying to do. GUIs are great for some things, but are hopeless for automation. CLIs are great for automation, once you know what you are doing. The ideal is to have both.
Excellent! I had the standalone code in there from when I was doing speed comparisons between it and openssl; I'm glad I left it in now.Just did a proper decryption test and its all looking good and quick!
Out of curiosity how does the speed compare between stiprts on windows and the java version?@af123 Just did a proper decryption test and its all looking good and quick! I just knocked up a vbscript file to search my NAS for encrypted files (which is why I was asking about HMT) and it looks like a have a lot more archived encrypted files than I anticipated so this utility should come in very handy! Thanks again.
Out of curiosity how does the speed compare between stiprts on windows and the java version?ave you tried the same recording with both and are the resultant files identical?