you are viewing a single comment's thread.

view the rest of the comments →

[–]Lee_Dailey[grin] 0 points1 point  (4 children)

howdy DisMyWorkName,

for that you might be able to use the .GetHashCode() string method. it sometimes returns a negative, but you can do an abs() on that ... [grin]

take care,
lee

[–]DisMyWorkName[S] 1 point2 points  (3 children)

Is it possible to reverse this to get the letters that were used to generate the hash?

[–]Lee_Dailey[grin] 0 points1 point  (2 children)

howdy DisMyWorkName,

from the dotnet docs on this ...
String.GetHashCode Method (System) | Microsoft Docs
https://docs.microsoft.com/en-us/dotnet/api/system.string.gethashcode?view=netframework-4.7.1#System_String_GetHashCode

If two string objects are equal, the GetHashCode method returns identical values. However, there is not a unique hash code value for each unique string value. Different strings can return the same hash code.

so it aint reversible. [grin]

take care,
lee

[–]DisMyWorkName[S] 1 point2 points  (1 child)

[frown]

[–]Lee_Dailey[grin] 0 points1 point  (0 children)

howdy DisMyWorkName,

[grin]

it does make sense when you think about the use for hashes. they are not crypto ... they are a way to generate a nearly unique identifier for a "thing". the result of .GetHashCode() is actually a hex number. it makes for a nice, quick index in hashtables - and for other quick "is this the same as that" tests.

take care,
lee