WALTER | Workable Algorithms for Location-aware Transmission, Encryption Response

StringExtensions..::..FromNumeric Method (String)

Decodes a string from its numeric encoded representation back to its original text form. This method reverses the encoding applied by AsNumeric, making it suitable for retrieving the original text from a numeric encoded string that was intended to be compact and less obvious.

Namespace:  System.Text
Assembly:  Walter.Cypher (in Walter.Cypher.dll)

Syntax


[CodeSampleAttribute]
public static string FromNumeric(
	this string value
)

Parameters

value
Type: String
The numeric encoded string to be decoded back into clear text.

Return Value

The original text encoded in the numeric string.

Remarks


Similar to AsNumeric, this decoding process is designed for simplicity and obfuscation rather than secure decryption. It is not a substitute for comprehensive encryption techniques but rather a method for reversing a specific lightweight encoding scheme. This process is culture-sensitive and should match the culture used during encoding to ensure accurate decoding.

Examples


Simple console application that allows developers to generate a numeric representation of a secret string using the AsNumeric() extension method.
Console App to generate a key from a string
using System;

   namespace NumericPasswordGenerator
   {
       class Program
       {
           static void Main(string[] args)
           {
               Console.WriteLine("Enter the secret string to convert:");
               string secretString = Console.ReadLine();

               string numericRepresentation = secretString.AsNumeric();
               Console.WriteLine($"Numeric representation: {numericRepresentation}");

               Console.WriteLine("\nCopy the above numeric representation into your appsettings.json file under an appropriate key.");
           }
       }
   }