Forum Replies Created
-
AuthorReplies
-
Hi Charlie –
Figured it out.
hcismatcrypt rekey <sitename> <key(sitename)> <file(smatfilename)> <newKey(”)>
(2 single quotes sets the key to blank or off)
Thank you for your assistance.
Lawrence Nelson
System Architect – MaineHealth ITDid that at the same time I posted. Thanks again.
Lawrence Nelson
System Architect – MaineHealth ITCharlie –
I didn’t catch it right off but I’m gathering there’s a misspelling of “decrypt” in your response above. Also, want to repeat we are on 6.2.4 (not version 19 or 20)
That being said – when I run the command provided I get this response back and file is not decrypted. Due to word wrapping below I’ve also attached a screen shot. Side note – When issued the command there was messaging around having to stop processes as the previous commands required.
cloproda.mmc.org::hci> hcicrypt decrypt -f to_SCC_orders_outQ.20201107000340.smatdb
^▒)#2k▒QR▒▒K▒_Q▒▒▒G▒▒▒▒@L▒9▒u▒F▒!▒_▒c7▒▒▒2*
▒D$lf▒▒)▒4▒▒▒▒X▒▒2Z▒▒Ml▒A$\▒:▒d▒▒6▒;▒A▒,▒▒
▒▒▒5▒)▒ߎ^T▒8T▒$}▒▒/▒@”▒\▒▒▒Vq▒▒7▒S▒▒츯▒▒毰ũ▒$m▒Qa▒b▒A▒▒▒
POw▒uInvalid encrypted datacloproda.mmc.org::hci> hcicrypt decrypt -f to_SCC_orders_outQ.20201108000331.smatdb
Invalid encrypted data
▒▒8▒▒#▒▒▒O▒▒▒H▒▒8▒䞻▒▒mW$▒n▒GD[▒▒(▒▒j▒▒
▒▒N ▒R▒▒▒▒z▒C▒▒M▒Ui▒▒▒]_▒▒▒▒▒▒▒Tα▒
▒▒▒ʣ▒▒A▒ ▒▒X▒<ϑ/▒R▒▒▒▒= [▒▒b▒.▒▒▒ľ6(▒▒▒▒,▒▒▒E▒▒▒▒bn[▒YΫ▒▒▒:3V▒▒▒~▒▒▒ໝ▒
▒f▒▒#▒kQ▒▒I7▒▒▒▒
j>▒▒ױ{UL▒B2~▒▒ί▒A▒▒_▒#▒▒▒S▒C▒g;2▒+▒▒v▒▒?W-▒▒▒D▒▒^▒▒2炈RO▒U▒/B▒▒
9L\▒▒BT2gq▒▒▒c▒o▒垻▒w+(PuTTYPuTTYPuTTYsGԦ▒;▒▒I<▒1X▒▒▒g▒¯Attachments:
You must be logged in to view attached files.Lawrence Nelson
System Architect – MaineHealth ITMarch 15, 2021 at 4:15 pm in reply to: SMAT db – Where do the saved “Select Criterion Definitions” store? #118607Thank you!
Lawrence Nelson
System Architect – MaineHealth ITFebruary 4, 2021 at 11:38 am in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118472Hi Charlie –
One other follow up for my setting up where I’m moving files –
Is this command able to be made to have the decrypted to a different folder/path location?
hcismatcrypt.htc rekey <sitename> <key> <SMAT FILE> “” <NEW FILE>
Something like ?
hcismatcrypt.htc rekey <sitename> <key> <SMAT FILE> “” <fullpath>//smatdb_decrypt/<NEW FILE>
Lawrence Nelson
System Architect – MaineHealth ITJanuary 25, 2021 at 3:05 pm in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118432Hi Charlie –
I’m sending the decrypted file to my dba partner – I think we have success!
Thank you!
2 follow ups –
What do the 2 quotes between the file names indicate. I had to change your characters to be my ‘keyboards’ version?
First attempt example
clotest::hci> hcismatcrypt rekey t80ndxorders t80ndxorders to_SCC_orders_outQ.20210119234432.smatdb ▒^▒^▒▒^▒^▒ SCC_orders_outQ.20210119234432.db
Also
My first attempt gave me this until I stopped all processes – seems odd that all the processes have to be stopped to decrypt a file.
clotest::hci> hcismatcrypt rekey t80ndxorders t80ndxorders to_SCC_orders_outQ.20210119234432.smatdb “” SCC_orders_outQ.20210119234432.db
Warning: Engines are running in current site. Please stop the process and try again.clotest::hci> hcismatcrypt rekey t80ndxorders t80ndxorders to_SCC_orders_outQ.20210119234432.smatdb “” SCC_orders_outQ.20210119234432.db
Successful for command rekey.Lawrence Nelson
System Architect – MaineHealth ITJanuary 8, 2021 at 11:27 am in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118344Charlie – Again sorry for being obtuse but I don’t see any prior references in here when I search for hcismatcrypt or hcidbscript in this conversation on Clovertech.
The only script I have from this conversation is hcidbsmat.tcl
Are you able to pass me these other scripts?
Lawrence Nelson
System Architect – MaineHealth ITJanuary 8, 2021 at 9:50 am in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118343Well there you go – we are not on 19 yet – we are on the last version of 6.24(?)
Lawrence Nelson
System Architect – MaineHealth ITJanuary 7, 2021 at 4:02 pm in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118339Hi Charlie –
I’ve been forwarding your responses to the dba architect I’m working with. He has attempted all of the items you’ve suggested – but without success.
When I send him an un-encrypted SMAT db file – it opens for him without issue.
The encrypted ones are a no go with the use of the site name.
I know that the sites SMAT setting have not been set up with passwords – that would over-write the use of the site name as the password.
I’ve gone in to a test site – and turned on encryption to assure that no password was set – it’s still a no go. I sent in a file pre and post encryption. The pre opened – the post does not. So we are at an impasse – and I’m not sure where to go with for next steps.
Here is the most recent response from the dba
I’ve already tried below with no success. I question if the password provided for the encrypted SMAT db you sent to me was in fact the correct password.
If it was, I should have been able to open the file with DB Browser (SQLCipher) using either “SQLCyphe 4 defaults” or “SQLCypher 3 defaults” as outlined
below. The resulting message in either case is the same and implies an incorrect password. Is there anyone in your group that may have opened an encrypted SMAT file outside of Cloverleaf?
[inserted picture content he sent reads as follows]
DB Browser for SQLite
Could not open database file.
Reason: Invalid file format.
Lawrence Nelson
System Architect – MaineHealth ITDecember 24, 2020 at 12:43 pm in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118304Charlie –
I know I’m being obtuse here – but our db team is not being successful with un-encrypting the SMAT db file – remotely aka OFF of the Cloverleaf platform.
Additionally, we’ve taken your script that Jim K. sent to me – and reviewed the contents in detail. We’ve confirmed the site ID spelling/case – and also that we haven’t set a password on the SMAT db – so it should be the site ID name.
“Using the SQL Cipher version of DB Browser (free to download), I was able to create my own test DB and set the encryption.
When I re-open the test DB, it prompts me for the key value. If I enter the correct value it opens as expected. If I enter the wrong value I get the message “Could not open database file. Reason: Invalid file format.”
I get the same message when I use this tool to open the encrypted db with encryption key previously provided, and the un-encrypted one from Cloverleaf (CLOTEST) SMAT opens as well.
Lawrence Nelson
System Architect – MaineHealth ITDecember 4, 2020 at 8:55 am in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118266Jeff –
Sorry – I read backwards in this chain and see what you are stating about decrypting. Thanks.
The current issue this leaves me with is that I’m not actually looking to decrypt it – into a database at the time (the sqlite3 dbhandle piece) – I’m looking to decrypt it period – as a file only – so it can be moved unencrypted by our EFT processes to where our database team can then work with it in their environment (not via ODBC).
Lawrence Nelson
System Architect – MaineHealth ITDecember 4, 2020 at 8:49 am in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118265Jeff –
Excuse my lack of knowledge –
but is what you’ve stated the command to decrypt and encrypted SMAT file or about pulling it into a external database – or a combination of both?
Regards,
Lawrence
Lawrence Nelson
System Architect – MaineHealth ITNovember 27, 2020 at 3:27 pm in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118253Hi Jim –
It’s been a holiday week for me – and Monday as well.
I took a very quick look at the script – and it looks to quite lengthy – as opposed to a single command line to decrypt a SMAT db file.
Lawrence
Lawrence Nelson
System Architect – MaineHealth ITNovember 23, 2020 at 12:18 pm in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118238Hi Jeff –
2 questions (requests)
1
Could you express this string with a less techical example (or an actual example) –
I know it will be different for our location but I’m not picking up everything you are stating in this string below.
<sqlite command> <dbHandle> <dbFilePath> -readonly <boolean> -key <encryptKey>
2 Where would you actually get the encryption key from?
Thank you for the response
Lawrence Nelson
System Architect – MaineHealth ITNovember 20, 2020 at 2:50 pm in reply to: Instructions on How to for de-encrypting SMAT DB from the command line. #118231Hi Jim –
I’m going with a No on that. Is there not a single command that can be issued?
To make sure I’m clear – this is for SMAT db and not SMAT (before db) which I recall having to decrypt once years ago.
Lawrence Nelson
System Architect – MaineHealth IT -
AuthorReplies