Namespace: OpenEdge.Core
Type: Class EncodedString
Parent Classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object
Implements: Ccs.Common.Support.ILongcharHolder, Progress.Collections.IHashable


Copyright (c) 2021,2023,2025 by Progress Software Corporation. All rights reserved.
File:EncodedString
Purpose:Encodes a clear-text string using any supported encryption
algorithm via EncodingTypeEnum, or nopr0 for clear-text
Author(s):pjudge
Created:2020-12-06
Notes:This class is intended as a helper for encoding strings in such
a way that it minimizes exposure of the original value to 4GLTrace or logging:
- The class is final to prevent unintentional exposure of the value
- The Value property must never use a setter implementation
- The Value property must never be overridden
(Property overrides are not available in 12.4 but may be in a future release)
- The Value must never be passed in via constructor argument nor into any method
- This class is NOT serializable because we cannot guarantee that
the Value has been encoded, nor that the Value getter is called
This class DOES NOT implement any new encoding mechanisms itself, it merely uses
the encoding capabilities already available within the OpenEdge ABL.
Please be aware that the Value will remain un-encoded so long as an encoding
type is not set, and no default will be provided. As a developer, you MUST
choose AND set an EncodingTypeEnum by either passing with the Constructor or
set via the Encoding property if you expect the supplied Value to be encoded!



Method Summary
  Options Name Purpose
  LOGICAL Equals (Object)
  INTEGER HashCode () /* Hashing method for creating a proper index for use with Progress.Collections.HashMap @return integer Result of the hash-code method using this object's comparable value(s) */
  CHARACTER ToString ()

Constructor Summary
  Options Name Purpose
  EncodedString () /* Default constructor. */
  EncodedString (EncodingTypeEnum) /* Constructor. @param EncodingTypeEnum The encoding to use */

Property Summary
  Options Name Purpose
  OpenEdge.Core.EncodingTypeEnum Encoding
  CHARACTER EncodingNames
  LONGCHAR Value


Method Detail
Top

LOGICAL Equals (Object)

Parameters:
pRef Progress.Lang.Object
 
Returns LOGICAL
 
Top

INTEGER HashCode ()

/* Hashing method for creating a proper index for use with Progress.Collections.HashMap
Returns INTEGER
  integer Result of the hash-code method using this object's comparable value(s)
Top

CHARACTER ToString ()

Returns CHARACTER
 


Constructor Detail
Top

EncodedString ()

/* Default constructor.
Top

EncodedString (EncodingTypeEnum)

/* Constructor.
Parameters:
pEncoding OpenEdge.Core.EncodingTypeEnum
 


Property Detail
Top

OpenEdge.Core.EncodingTypeEnum Encoding

Returns OpenEdge.Core.EncodingTypeEnum
 
Top

CHARACTER EncodingNames

Returns CHARACTER
 
Top

LONGCHAR Value

Returns LONGCHAR