Kbase 21685: 4GL/ABL: The one way uniqueness of the Progress 4GL ENCODE function
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/3/2008 |
|
Status: Verified
GOAL:
4GL/ABL: The one way uniqueness of the Progress 4GL ENCODE function
GOAL:
What does the Progress 4GL ENCODE function do?
GOAL:
Can the action of the Progress 4GL ENCODE function be reversed?
GOAL:
What algorithm is used by the Progress 4GL ENCODE function?
FACT(s) (Environment):
All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
FIX:
The Progress 4GL ENCODE Function takes a character string as input and returns a 16 character long encoded string.
Although the same source character string always yields a unique result the reverse is not true. That is the action of the Progress 4GL ENCODE function is not reversible and there is no 4GL function that would return the original source string by acting upon its encrypted value.
The Progress 4GL ENCODE function uses a CRC-16 algorithm to generate its encoded output. This calculation involves a mathematical computational process that applies a polynomial value on the string.
The Progress 4GL ENCODE function operates on strings containing single as well as double-byte characters; of any length subject to Progress 4GL variable size limitations; and performs a one-way encoding operation that is irreversible. That is:
If cStringA = cStringB THEN
ENCODE(cStringA) = ENCODE(cStringB).
However,
IF ENCODE(cStringA) = ENCODE(cStringB) THEN
cStringA may or may not be equal to cStringB.
In other words it is not possible to determine the original string from the result returned by the Progress 4GL ENCODE function .