Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
LavenderGree2 authored Aug 26, 2024
1 parent dc7d83d commit fad4320
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions ChallengeAlura.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="es">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Encriptador de texto</title>
<style>
body {
margin: 0;
padding: 0;
font-family: 'Century Schoolbook', serif;
background-image: url('Default_Dark_background_with_neon_green_computer_code_designs_1.jpg');
background-size: cover;
background-position: center;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

#container {
text-align: center;
background-color: rgba(158, 156, 156, 0.9); /* Fondo lila con transparencia */
padding: 20px;
border-radius: 10px;
}

#text, #encrypted-text {
width: 80%;
padding: 10px;
margin: 10px 0;
border: 2px solid black;
border-radius: 5px;
box-sizing: border-box;
font-family: 'Century Schoolbook', serif;
}

button {
padding: 10px 20px;
background-color: #00ff1a; /* Color lila más oscuro */
color: rgb(26, 26, 25);
border: none;
border-radius: 5px;
margin: 10px;
cursor: pointer;
}
</style>
</head>

<body>
<div id="container">
<h1>Mantén tus secretos encriptados</h1>
<textarea id="text" placeholder="Ingresa tu texto aquí"></textarea>
<button onclick="encryptText()">Generar</button>
<button onclick="clearText()">Borrar</button>
<div>
<textarea id="encrypted-text" readonly></textarea>
</div>
</div>

<script>
function encryptText() {
const text = document.getElementById('text').value;
const encryptedText = btoa(text); // Encripta el texto en Base64
document.getElementById('encrypted-text').value = encryptedText;
}

function clearText() {
document.getElementById('text').value = '';
document.getElementById('encrypted-text').value = '';
}
</script>
</body>

</html>

0 comments on commit fad4320

Please sign in to comment.