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

StringExtensions..::..TryAsNumeric Method (String, String%, UInt64%)

convert the value as a numeric string, if short enough you will also get the int64 value however for longer text than a few characters you will need to use string.TryAsNumeric(out IEnumerable<ulong> longArray)

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

Syntax


[MethodImplAttribute]
public static bool TryAsNumeric(
	this string input,
	out string resultAsString,
	out ulong resultAsLong
)

Parameters

input
Type: String
the text to parse
resultAsString
Type: String%
the resulting value
resultAsLong
Type: UInt64%
the int64 value or 0 if failed

Return Value

true if it was possible to generate a int64 value from the input string

Remarks


This type of cipher may not be as strong as provided by the PGPManaged or the other cipher classes the advantage is that the value is not stored in a base64 string and numeric values are easy to store without it being obviouse as to what the actual value of the number array is.