CommonUtil.GenerateHash Method (String)

MultiArchive SDK .NET

Collapse image Expand Image Copy image CopyHover image

[This is preliminary documentation and is subject to change.]

Utility method that generates an MD5 Hash from a file.

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(
	string filePathAndName
)
Visual Basic
Public Shared Function GenerateHash ( 
	filePathAndName As String
) As String
Visual C++
public:
static String^ GenerateHash(
	String^ filePathAndName
)

Parameters

filePathAndName
Type: System..::..String
The path and name of the file for which a hash should be generated.

Return Value

Type: String
A string containing the generated MD5 hash.

Examples

C#  Copy imageCopy
class TestClass 
{
    static void Main()
    {
        string md5Hash = CommonUtils.GenerateHash(@"C:\HelloWorld.txt");
    }
}

Exceptions

Exception Condition
MultiArchive.SDK.Services.Exceptions..::..ItemException Throws an ItemException if the path specified is empty.

See Also