[This is preliminary documentation and is subject to change.]
Utility method that generates an MD5 hash from a byte array.
Namespace: MultiArchive.SDK.ServiceUtils
Assembly: MultiArchive.SDK (in MultiArchive.SDK.dll) Version: 1.2.30.413 (1.2.30.413)
Syntax
C# |
---|
public static string GenerateHash(
byte[] itemContent
) |
Visual Basic |
---|
Public Shared Function GenerateHash (
itemContent As Byte()
) As String |
Visual C++ |
---|
public:
static String^ GenerateHash(
array<unsigned char>^ itemContent
) |
Parameters
- itemContent
- Type: array<System..::..Byte>[]()[][]
A byte array containing the content for which a hash should be generated.
Return Value
Type:
StringA string containing the generated MD5 hash.
Examples
C# |
Copy
|
class TestClass
{
static void Main()
{
UTF8Encoding enc = new UTF8Encoding();
byte[] byteContent = enc.GetBytes("Hello World.");
string md5Hash = CommonUtils.GenerateHash(byteContent);
}
}
|
Exceptions
See Also