Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hash128(), hash160 & hash256 ?

Hi community,

What is hash function?

What are the advantages of hash functions ?

what are the difference between hash128(), hash160 & hash256?

in which scenario we can use ?

Thanks and Regards

Satti

11 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Hash function creates an internal representation of fields associated;

replaces the old logic of concatenate strings so previously we had

field1 & field2 ... & fieldn as myfield

now we can write autonumberhash128(field1, field2 ...) as myfield

The advantage is that everithing is left to the function, the code is internal, univoque and safe.

128, 160, 256 depends on the number of bytes involved so if you have a long list of field you need 256 ...

Hope it helps

Not applicable
Author

could you provide an example App ?

Thanks

Satti

rustyfishbones
Master II
Master II

You can use HASH128() if you want to scramble text

so in the Script or even an Expression List Box you can use;

HASH128(Product) as ScrambledProduct

Try it

I have attached a sample app where I have created a List Box Epression to emphasize HASH128

Regards

uacg0009
Partner - Specialist
Partner - Specialist

I have checked the attached file. And the hash128() is useful and that's what I want. But I have another question. Is

there have any ways to make it back to original data if we use the hash128() function?

Sorry for my poor English.

Thanks!

rustyfishbones
Master II
Master II

Yes, just remove the HASH(128)

like in the example qvw I posted earlier

Instead of HASH128(Alpha)

just say Alpha and the strings will revert to the original

uacg0009
Partner - Specialist
Partner - Specialist

Thanks for your answer. But sorry for my previous presentation. Maybe it's not so clear to let you know what I want.

Let me make it clarify. I just want a way like hash128() or some other functions that I don't know to make the data

encrypted. And I also need a way to make it back. Do you have any ideas about the problem?

Thanks and Best Regards!

rustyfishbones
Master II
Master II

You can use the Scramble option in Qlikview.

However to revert back to the actual Data you will need to reload the script.

Go to Document properties, choose your Field and Click Scramble.

This will keep the field Data Scrambled until the Document is reloaded

Thats all I know

2013-10-18_0859.png

barryharmsen
Luminary Alumni
Luminary Alumni

Hashing is a one-way operation, so you cannot (theoretically) decode a hashed value.

Not applicable
Author

when do we want to scramble? whats the use when reloading will unscramble it back?