Raydium Framework

HashValidator
in package

Table of Contents

isMd5()  : bool
Checks if a given string is a valid MD5 hash.

Methods

isMd5()

Checks if a given string is a valid MD5 hash.

public static isMd5(string $string) : bool

This method checks the length of the string to ensure it is 32 characters long and verifies that all characters are hexadecimal digits, which is the format of an MD5 hash.

Parameters
$string : string

The string to check.

Return values
bool

Returns true if the string is a valid MD5 hash, otherwise false.

Search results