JavaScript DHTML/Security/Base64

Материал из Web эксперт
Перейти к: навигация, поиск

Base64 Encoding/Decoding

   <source lang="html4strict">

<html>

 <head>
   
   <title>Base64 Encoding/Decoding</title>
 </head>
 <body>
  <script type="text/javascript"></script>
   <form name="base64Form">
       Type in the message you want to encode in Base64, or paste
Base64 encoded text into the text field, select Encode or Decode,
and click the button! You can use Base64 encoded messages with
the <a href="stegano.html">Steganography</a> page.

<textarea name="theText" cols="40" rows="6"></textarea>
<input type="button" name="encode" value="Encode to base64" onClick="document.base64Form.theText.value=encode64(document.base64Form.theText.value);"> <input type="button" name="decode" value="Decode from base64" onClick="document.base64Form.theText.value=decode64(document.base64Form.theText.value);"> <center> </form> </body>

</html>

</source>