setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $db->prepare("INSERT INTO md5_data (md5, value) VALUES (:md5, :value)");
$stmt->bindParam(':md5', $md5_hash);
$stmt->bindParam(':value', $_POST["md5-text"]);
$stmt->execute();
echo '
Generate MD5 Hash
The MD5 Hash Generator tool allows you to quickly and easily generate an MD5 hash from any text input. This is useful for creating checksums, storing passwords securely, or any other application where a unique hash representation of your data is needed.
';
echo '
';
// echo json_encode(array('success' => true, 'message' => 'Data inserted successfully'));
// echo '';
} catch (PDOException $e) {
echo json_encode(array('success' => false, 'message' => 'Database error: ' . $e->getMessage()));
exit();
}
}else{
echo '';
}
?>
Usage:
- Enter Text: Input your desired text into the text area provided.
- Generate MD5 Hash: Click the "Generate MD5 Hash" button to convert the text into an MD5 hash.
- Copy Hash: Once generated, the hash will appear in the output text area. Click the "Copy" button to copy it to your clipboard.
- Paste and Use: Paste the copied hash directly into your application, database, or any other place where you need an MD5 hash.
Features:
- Generates a unique MD5 hash from any input text.
- Displays the generated hash in a read-only text area for easy copying.
- Provides a "Copy" button to quickly copy the generated hash to the clipboard.
- Includes error handling to manage database insertion issues gracefully.
Example Use Cases:
- Web developers creating checksums for file verification.
- Security professionals storing passwords securely in a database.
- Software engineers ensuring data integrity by generating unique hashes for sensitive data.