umbennen von frontend zu frontend

This commit is contained in:
Nirodan
2025-06-14 14:01:20 +02:00
parent 6530638141
commit 5424351cea
22 changed files with 50 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
import { useState } from 'react';
import axios from '../services/api';
function Md5Tool() {
const [input, setInput] = useState('');
const [result, setResult] = useState('');
const hashPassword = async () => {
try {
const res = await axios.post('/hash/md5', { password: input });
setResult(res.data.md5);
} catch (err) {
alert('Fehler beim Hashen');
}
};
return (
<div>
<h2>MD5 Hasher</h2>
<input
type="text"
value={input}
onChange={(e) => setInput(e.target.value)}
placeholder="Gib ein Passwort ein"
/>
<button onClick={hashPassword}>Hash berechnen</button>
{result && <p><strong>MD5:</strong> {result}</p>}
</div>
);
}
export default Md5Tool;