Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Decrypt Data from DES Block Cipher Enyryption

Hello

I have encrypted Data from a Database.

The Encyrption Method is "DES Block Cipher"

e.g. a encryped number is looking like this: 1q4zxq1phbha9

Is there any function in Qlikview for decrypt such Data?

I also searched for vbscript Macros but didn´t find any working snippets.

Thank you for any advise

6 Replies
Gysbert_Wassenaar

No, there isn't. You can try implementing one yourself in either vbscript or javascript. For example using crypto-js


talk is cheap, supply exceeds demand
Not applicable
Author

Hello Dan,

thank you for your apply.

In your sample App you only have the AES encryption method, am i right?

Not applicable
Author

Thank you Dan,

This function uses the method 3DES

But in my Database I have DES method.

So I used:

function encryptDES(value, key) {

  return CryptoJS.DES.encrypt(value, key).toString();

}

function decryptDES(value, key) {

    return CryptoJS.DES.decrypt(value, key).toString(CryptoJS.enc.Utf8);

}

But now my Problem is, with this Method I´m getting way longer encrypted numbers.

In my Database the encrypted Numbers only have 13 characters.

Not applicable
Author

Hey Dan,

The Numbers in my Database are encrypted to 13 characters.

With the method from above, i get longer encryption.

Not the number in the Database has 13 digits.

Not applicable
Author

I'm sorry confusing you.

My data is already encrypted. I Know its encrypted with DES block cipher.

Now I want to decrypt it. With the code from above it doesn't work. Because

the entries are all only 13 chars long.

When I use the encrypt and decrypt method with a hard coded number it's

working. like: encrypt(94175, key) But then I get a longer encryption than

13 chars.

Hope it makes it clear

Am 04.02.2016 19:51 schrieb "Dan Greeberg" <qcwebmaster@qlikview.com>:

Not applicable
Author

Thank you,

I'm getting different results as I'm expecting. Is there any possibility to adjust the code from crypto-js?