You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have already requested this on Yammer, but I now have a very specific case where I need this: Regarding my issue #2699, I would like to become the primary key for Table 49 to be a 40 character hash string that is generated out of a number of fields, instead of concatenating the various fields together (and probably blows the 250 character limit). But we do not have any access to hash functions, be it MD5, SHA-1 or anything.
I've recently noticed the Codeunits in range 3000 .. 3026 that neatly wrap .NET features in C/AL Codeunits and thus allowing us to use them. Please add another Codeunit here that provides us with simplified access to hashing functions that take 1 string and return 1 string. Something like this:
CalculateSHA256(Value : Text) : Text
enc := enc.UTF8;
SHA256 := SHA256.SHA256Managed();
ba := enc.GetBytes(Value);
ba := SHA256.ComputeHash(ba);
EXIT(GetHexString(ba));
The text was updated successfully, but these errors were encountered:
@pzentner Lovely. Haven't noticed. That is exactly what I was looking for.
I just think it should be exposed "more clearly". I mean: is it just coincidence that that function is there and public? Will it still be there tomorrow? I would've expected it to be a dedicated Codeunit...
I have already requested this on Yammer, but I now have a very specific case where I need this: Regarding my issue #2699, I would like to become the primary key for Table 49 to be a 40 character hash string that is generated out of a number of fields, instead of concatenating the various fields together (and probably blows the 250 character limit). But we do not have any access to hash functions, be it MD5, SHA-1 or anything.
I've recently noticed the Codeunits in range 3000 .. 3026 that neatly wrap .NET features in C/AL Codeunits and thus allowing us to use them. Please add another Codeunit here that provides us with simplified access to hashing functions that take 1 string and return 1 string. Something like this:
The text was updated successfully, but these errors were encountered: