NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class HashUtils

Contains hashing utilities

Namespace: Aws\Common\Hash
Located at Aws/Common/Hash/HashUtils.php

## Methods summary

- `public static` `hexToBin ( string $hash )`

  Converts a hash in hex form to binary form

- `public static` `binToHex ( string $hash )`

  Converts a hash in binary form to hex form

- `public static` `validateAlgorithm ( string $algorithm )`

  Checks if the algorithm specified exists and throws an exception if it does not

## Methods detail

# `public static string`
`hexToBin( string $hash )`

Converts a hash in hex form to binary form

#### Parameters

$hash
  `string`
  $hash Hash in hex form

#### Returns

`string`
Hash in binary form
# `public static string`
`binToHex( string $hash )`

Converts a hash in binary form to hex form

#### Parameters

$hash
  `string`
  $hash Hash in binary form

#### Returns

`string`
Hash in hex form
# `public static boolean`
`validateAlgorithm( string $algorithm )`

Checks if the algorithm specified exists and throws an exception if it does not

#### Parameters

$algorithm
  `string`
  $algorithm Name of the algorithm to validate

#### Returns

`boolean`

#### Throws

``Aws\Common\Exception\InvalidArgumentException``
if the algorithm doesn't exist

### Magic methods summary