guiddigitencoder
Reactive icon

GuidDigitEncoder

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 4 May (yesterday)
 by 
4.0
 (1 rating)
guiddigitencoder

GuidDigitEncoder

Documentation
1.0.0

📘 GUID Digit Encoder – Full Documentation

🧩 Overview

The GUID Digit Encoder is a utility that encodes numeric values into a sequence of GUIDs and decodes them back to their original form. It uses a fixed mapping between digits (0–9) and predefined GUIDs, enabling reversible obfuscation of numeric data.


📚 Purpose

This component is designed for:

  • Obscuring numeric IDs in a non-sequential, non-predictable format.

  • Creating reversible representations of numbers.

  • Demonstrating basic encoding and decoding principles for educational or utility purposes.


🔠 GUID Mapping

A fixed array of 10 GUIDs is used, where each GUID corresponds to a digit from 0 to 9.


🔤 Delimiter

A special character (, EN DASH) is used to separate GUIDs in the encoded string.


🔧 Methods

MssEncodeNumberToGuids

🔍 Description:

Encodes a non-negative integer by converting each digit to its mapped GUID.

📥 Parameters:

  • ssnumericValue (long): The input number to encode.

  • ssguidSequence (out string): The resulting GUID sequence string.

⚠ Notes:

  • Returns an empty string if the input is negative or invalid.

  • Only digits between 0 and 9 are valid.


MssDecodeGuidsToNumber

🔍 Description:

Decodes a GUID sequence string back into the original numeric value.

📥 Parameters:

  • ssguidSequence (string): The encoded GUID string.

  • ssnumericValue (out long): The decoded numeric value.

⚠ Notes:

  • Returns -1 if any GUID is invalid or if the input string is empty or malformed.


🧪 Use Cases

  • Securely representing internal numeric identifiers in URLs or logs.

  • Creating human-unfriendly codes to discourage tampering or guessing.

  • Utility component in OutSystems or .NET-based applications.


🏁 Performance Notes

  • Uses efficient StringBuilder for string manipulation.

  • Uses Array.FindIndex for matching, which is performant for the small fixed array.


🏷 Tags

GUID, Encoding, Decoding, Numeric Obfuscation, Reversible Mapping, OutSystems, Security, Data Masking, Utilities