June 29, 2011

0 Protect Content with JavaScript Encryption & Decryption

A Very useful secured script for protecting ur blog / site content posts  with password has been created by  vincentcheung. This script created by him hides what ever text or content etc which we wish to hide from certain people online and it can only be seen and revealed by users who have the password to unlock the content. Even i used it for test purpose and have found it very useful and effective.


This hidden content cannot be easily cracked, hacked at all and your content remains safe from all unwanted visitors and users. Even the site author claims that he cannot cracked the password for hidden encrypted code its only visible to the person who has set the password .


Can say this is unique powerful script and thoroughly enjoyed working implementing this script and above all it helps us maintain privacy and secrecy for our content online.




password for this below given demo script is : webprogramming  ( try using the following script  with the password given )












<head>
<script type="text/javascript"src="http://www.vincentcheung.ca/jsencryption/jsencryption.js"></script>
</head>

<body>
<div id="eAqzR1cs"title="U2FsdGVkX18mLXBrVhO6NNCYkDQP+b6vBYJ4mdYbK0g=">
<a href="javascript:decryptText('eAqzR1cs')">Show encrypted text</a>
</div>
</body>







Instructions


To put encrypted text in your own site:


01 )  Encrypt your text on the encryption page


a) Type the password it can be random chosen or manual passowrd for the encrypted text in the Key box (be sure to remember the key!)





b) Enter whatever you want to encrypt in the Plain Text box ...Click Encrypt



Copy and paste the code in the HTML Code box into your website or blog

The JavaScript decryption code


Between the  and  tags in the html code of your webpage, add the following:



Encrypted text and decryption link


This is the basic code to use in the body of the html code of your webpage to do the decryption:
<div id="uniqueID" title="encrypted text">
 <a href="javascript:decryptText('uniqueID')">Show encrypted text</a>
</div>


encrypted text is the encrypted text generated from the encryption/decryption page.
uniqueID is a unique name for the element, which is automatically generated by the encryption/decryption page in the sample code. This can be anything that you want, but do not put your key here because it is visible to everyone.
The decryptText JavaScript function gets the encrypted text from the title of the element with the id uniqueID. Once decrypted, the contents of the element are replaced with the decrypted text.
The two uniqueID's must be exactly the same, otherwise the code will not work.
See the examples page to see this in action and for different uses..


To see the example working live please click on below ( password is 7gqCB0M9 )










    0 comments:

    Post a Comment

    Blogger Themes

     
    Powered by Blogger