Question Encode?

Hi guys, Is there a function, method or syntax for reencode?

I got this sample syntax.

Code:
Message encode('caloy') view-as alert-box.

But what about searching the result for that encoded string..hmmmm vice versa i mean..

Any replay is so much appreciated
 
You want to decode the result? No there isn't something that does that. I believe it's not that difficult to reverse engineer, but the point is you're not supposed to.
 
There is no DECODE function in Progress. What is encoded stays encoded.
I use this workaround to get the encoded value. I have encoded passwords stored in a table. I use a small brute-force logic and compare the ENCODE(value) to what is stored in the table and get the match. Sometimes when I know a set of possible passwords, I just try to compare ENCODE(value) with what is in the table and identify the password. That worked for me.
 
you can also make use of ENCRYPT and DECRYPT function.
Code:
define variable mykey as raw no-undo.
define variable enc-value as raw no-undo.
define variable dec-value as raw no-undo.

mykey = generate-random-key.

enc-value = encrypt("1234",mykey) .


message encrypt("1234",mykey) decrypt(enc-value,mykey) view-as alert-box.
 
ENCODE is a hash function. By nature these functions are "one way". Multiple source values can encode to the same result. That's why you cannot reverse it. The approach above using a db table gives you one possible source value. But it is not necessarily *the* source value.
 
Back
Top