Class Md5Utils
Namespace: Aurigma.DesignAtoms.Convert
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class Md5Utils : IMd5Util
Inheritance: System.Object -> Md5Utils
Implements
Inherited Members
System.Object.ToStringSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.ReferenceEquals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseClone
Constructors
Md5Utils
public Md5Utils()
Methods
GetFileId
public byte[] GetFileId(string imagePath)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | imagePath |
Returns
System.Byte[]
ComputeFileId
public static byte[] ComputeFileId(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileName |
Returns
System.Byte[]
ComputeObjectsHash
public static byte[] ComputeObjectsHash(params object[] objects)
Parameters
| Type | Name | Description |
|---|---|---|
System.Object[] | objects |
Returns
System.Byte[]
CalculateMD5ByteArray
public static byte[] CalculateMD5ByteArray(IList<byte[]> multiBlockData)
Parameters
| Type | Name | Description |
|---|---|---|
System.Collections.Generic.IList<System.Byte[]> | multiBlockData |
Returns
System.Byte[]
ComputeFileIdString
public static string ComputeFileIdString(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | fileName |
Returns
System.String
ComputeFileIdString
public static string ComputeFileIdString(byte[] bytes)
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | bytes |
Returns
System.String
ComputeStringId
public static string ComputeStringId(string str)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | str |
Returns
System.String
ComputeObjectsCacheName
public static string ComputeObjectsCacheName(object[] objects, string postfix)
Parameters
| Type | Name | Description |
|---|---|---|
System.Object[] | objects | |
System.String | postfix |
Returns
System.String
CalculateMD5
public static string CalculateMD5(FileInfo file)
Parameters
| Type | Name | Description |
|---|---|---|
System.IO.FileInfo | file |
Returns
System.String
CalculateMD5
public static string CalculateMD5(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | data |
Returns
System.String
GetMd5
public static string GetMd5(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
System.Object | obj |
Returns
System.String
CalculateMD5
public static string CalculateMD5(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
System.IO.Stream | stream |
Returns
System.String
GetBytes
public static IEnumerable<byte> GetBytes(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
System.IO.Stream | stream |
Returns
System.Collections.Generic.IEnumerable<System.Byte>
GetBytes
public static IEnumerable<byte> GetBytes(RectangleF? rectangle)
Parameters
| Type | Name | Description |
|---|---|---|
System.Nullable<System.Drawing.RectangleF> | rectangle |
Returns
System.Collections.Generic.IEnumerable<System.Byte>
GetBytes
public static IEnumerable<byte> GetBytes(PointF? point)
Parameters
| Type | Name | Description |
|---|---|---|
System.Nullable<System.Drawing.PointF> | point |
Returns
System.Collections.Generic.IEnumerable<System.Byte>
GetBytes
public static IEnumerable<byte> GetBytes(SizeF? size)
Parameters
| Type | Name | Description |
|---|---|---|
System.Nullable<System.Drawing.SizeF> | size |
Returns
System.Collections.Generic.IEnumerable<System.Byte>