»
EnglishFrenchVietnamese

Print - Web Cipher - JavaScriptBank.com

Full version: jsB@nk » Security » Encryption » Web Cipher
URL: http://www.javascriptbank.com/web-cipher-index.html

Web Cipher © JavaScriptBank.comWeb Cipher is a client-side, cryptographically secure document JavaScript encryption technology. It allows even an inexperienced web author to establish virtually uncrackable safety measures on confidential data. Web Cipher is also fast, substantially overcoming the problem of speed in browser-based cryptology. It averages almost 15K per second in real-world tests on an iMac 333 MHz computer, much faster than similar utilities.

Full version: jsB@nk » Security » Encryption » Web Cipher
URL: http://www.javascriptbank.com/web-cipher-index.html



CSS
<style type="text/css">dt { font-weight: bold }h1 { text-align: center }</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script type="text/javascript" src="cipher.js"></script><script type="text/javascript">function tpl(data, safe) {data.serve = function(data) {var out='', ref=0, pos=0, end=0, val;while ((pos=data.indexOf('\x3c%', ref)) != -1) {if ((end=data.indexOf('%>', pos +2)) != -1) {val = eval(data.substring(pos+2, end));out += data.substring(ref, pos) + (safe ? safe(val) : val);ref = end + 2;} else { break }}return out + data.substring(ref);};return data;}function make_document(f) {encipher(f);self.status = 'Creating Web Cipher document...';f.stream.value = tpl(f).serve(f.template.value);self.status = 'Done';}function undo_document(f) {if (!decipher(f)) return;var it=f.stream.value, to = f.popup.checked ? window.open('', 'web_cipher') : self;to.status = 'Opening Web Cipher document...';to.document.open();to.document.write(it);to.document.close();to.status = 'Done';}function select_action(script_function) {if (typeof(script_function) == 'function')select_action.prototype.selected = script_function;else if (select_action.prototype.selected)select_action.prototype.selected(script_function);}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form><table align="center"><tbody><tr><th>Content</th><th>Controls</th></tr><tr><td><textarea name="stream" cols="50" rows="10"></textarea></td><td><dl><dt><a href="#script-source">Script source</a></dt><dd>  <input type="text" name="file" value="cipher.js" size="20"></dd><dt><a href="#password-key">Key</a></dt><dd>  <input type="text" name="key" maxlength="64" size="20"></dd><dt><a href="#open-in-new-window">Open in new window</a></dt><dd>  <input checked="checked" type="checkbox" name="popup" onclick="if (!this.checked) this.checked = !confirm('Really use existing window?')" value="ON"></dd></dl></td></tr><tr><td colspan="2" align="center"><p><input type="submit" value="Encipher" onclick="select_action(encipher)"><input type="submit" value="Decipher" onclick="select_action(decipher)"><input type="submit" value="Protect Document" onclick="select_action(make_document)"><input type="submit" value="View/Extract Document" onclick="var txt=this.form.stream.value, str='value=&quot;' + salt(this.form.key.value), pos=str.length-2+txt.indexOf(str);if (pos > str.length) this.form.stream.value = txt.substring(pos, txt.indexOf('&quot;', pos));select_action(undo_document);"></p></td></tr></tbody></table></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/security/Web_Cipher/cipher.js