Skip to main content

Class Md5Utils

Namespace: Aurigma.DesignAtoms.Convert​
Assembly: Aurigma.DesignAtoms.dll​
Syntax
public class Md5Utils : IMd5Util

Inheritance: System.Object -> Md5Utils

Implements​

Inherited Members​

  • System.Object.ToString
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone

Constructors​

Md5Utils​

public Md5Utils()

Methods​

GetFileId​

public byte[] GetFileId(string imagePath)
Parameters​
TypeNameDescription
System.StringimagePath
Returns​

System.Byte[]

ComputeFileId​

public static byte[] ComputeFileId(string fileName)
Parameters​
TypeNameDescription
System.StringfileName
Returns​

System.Byte[]

ComputeObjectsHash​

public static byte[] ComputeObjectsHash(params object[] objects)
Parameters​
TypeNameDescription
System.Object[]objects
Returns​

System.Byte[]

CalculateMD5ByteArray​

public static byte[] CalculateMD5ByteArray(IList<byte[]> multiBlockData)
Parameters​
TypeNameDescription
System.Collections.Generic.IList<System.Byte[]>multiBlockData
Returns​

System.Byte[]

ComputeFileIdString​

public static string ComputeFileIdString(string fileName)
Parameters​
TypeNameDescription
System.StringfileName
Returns​

System.String

ComputeFileIdString​

public static string ComputeFileIdString(byte[] bytes)
Parameters​
TypeNameDescription
System.Byte[]bytes
Returns​

System.String

ComputeStringId​

public static string ComputeStringId(string str)
Parameters​
TypeNameDescription
System.Stringstr
Returns​

System.String

ComputeObjectsCacheName​

public static string ComputeObjectsCacheName(object[] objects, string postfix)
Parameters​
TypeNameDescription
System.Object[]objects
System.Stringpostfix
Returns​

System.String

CalculateMD5​

public static string CalculateMD5(FileInfo file)
Parameters​
TypeNameDescription
System.IO.FileInfofile
Returns​

System.String

CalculateMD5​

public static string CalculateMD5(byte[] data)
Parameters​
TypeNameDescription
System.Byte[]data
Returns​

System.String

GetMd5​

public static string GetMd5(object obj)
Parameters​
TypeNameDescription
System.Objectobj
Returns​

System.String

CalculateMD5​

public static string CalculateMD5(Stream stream)
Parameters​
TypeNameDescription
System.IO.Streamstream
Returns​

System.String

GetBytes​

public static IEnumerable<byte> GetBytes(Stream stream)
Parameters​
TypeNameDescription
System.IO.Streamstream
Returns​

System.Collections.Generic.IEnumerable<System.Byte>

GetBytes​

public static IEnumerable<byte> GetBytes(RectangleF? rectangle)
Parameters​
TypeNameDescription
System.Nullable<System.Drawing.RectangleF>rectangle
Returns​

System.Collections.Generic.IEnumerable<System.Byte>

GetBytes​

public static IEnumerable<byte> GetBytes(PointF? point)
Parameters​
TypeNameDescription
System.Nullable<System.Drawing.PointF>point
Returns​

System.Collections.Generic.IEnumerable<System.Byte>

GetBytes​

public static IEnumerable<byte> GetBytes(SizeF? size)
Parameters​
TypeNameDescription
System.Nullable<System.Drawing.SizeF>size
Returns​

System.Collections.Generic.IEnumerable<System.Byte>

Was this page helpful?