Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Decrypt Data from DES Block Cipher Enyryption

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
Highlighted
Not applicable

Re: Decrypt Data from DES Block Cipher Enyryption

Hello Dan,

thank you for your apply.

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

Highlighted
Not applicable

Re: Decrypt Data from DES Block Cipher Enyryption

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.

Highlighted
Not applicable

Re: Decrypt Data from DES Block Cipher Enyryption

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.

Highlighted
Not applicable

Re: Decrypt Data from DES Block Cipher Enyryption

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>:

Highlighted
Not applicable

Re: Decrypt Data from DES Block Cipher Enyryption

Thank you,

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