---
title: "Class Md5Utils | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Convert/Md5Utils/"
---

# Class Md5Utils

> **Inheritance:** `System.Object` -> Md5Utils

###### **Namespace**: [Aurigma.DesignAtoms.Convert](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Convert.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public class Md5Utils : IMd5Util
```

## Implements

* [Aurigma.DesignAtoms.Model.Utils.IMd5Util](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Utils/IMd5Util.md)

## 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

```csharp
public Md5Utils()
```

## Methods

### GetFileId

```csharp
public byte[] GetFileId(string imagePath)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *imagePath* |  |

##### Returns

`System.Byte[]`

### ComputeFileId

```csharp
public static byte[] ComputeFileId(string fileName)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileName* |  |

##### Returns

`System.Byte[]`

### ComputeObjectsHash

```csharp
public static byte[] ComputeObjectsHash(params object[] objects)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Object[]` | *objects* |  |

##### Returns

`System.Byte[]`

### CalculateMD5ByteArray

```csharp
public static byte[] CalculateMD5ByteArray(IList<byte[]> multiBlockData)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Collections.Generic.IList<System.Byte[]>` | *multiBlockData* |  |

##### Returns

`System.Byte[]`

### ComputeFileIdString

```csharp
public static string ComputeFileIdString(string fileName)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *fileName* |  |

##### Returns

`System.String`

### ComputeFileIdString

```csharp
public static string ComputeFileIdString(byte[] bytes)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Byte[]` | *bytes* |  |

##### Returns

`System.String`

### ComputeStringId

```csharp
public static string ComputeStringId(string str)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *str* |  |

##### Returns

`System.String`

### ComputeObjectsCacheName

```csharp
public static string ComputeObjectsCacheName(object[] objects, string postfix)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Object[]` | *objects* |  |
| `System.String` | *postfix* |  |

##### Returns

`System.String`

### CalculateMD5

```csharp
public static string CalculateMD5(FileInfo file)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.FileInfo` | *file* |  |

##### Returns

`System.String`

### CalculateMD5

```csharp
public static string CalculateMD5(byte[] data)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Byte[]` | *data* |  |

##### Returns

`System.String`

### GetMd5

```csharp
public static string GetMd5(object obj)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Object` | *obj* |  |

##### Returns

`System.String`

### CalculateMD5

```csharp
public static string CalculateMD5(Stream stream)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *stream* |  |

##### Returns

`System.String`

### GetBytes

```csharp
public static IEnumerable<byte> GetBytes(Stream stream)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.IO.Stream` | *stream* |  |

##### Returns

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

### GetBytes

```csharp
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

```csharp
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

```csharp
public static IEnumerable<byte> GetBytes(SizeF? size)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Nullable<System.Drawing.SizeF>` | *size* |  |

##### Returns

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