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 (

MD5 Hasher

setInput(e.target.value)} placeholder="Gib ein Passwort ein" /> {result &&

MD5: {result}

}
); } export default Md5Tool;