Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Please give me an code for encrypt and decrypt file or text using public key cryptography using (RSA) algorithm ...in html,css,javascript
Posted
Comments
F-ES Sitecore 29-Aug-15 9:00am    
Have you at least tried to google for a solution?

HTML, CSS and JavaScript are not designed to work for cryptographic services, that is why you need some back-end framework such as C# or other server-side languages. You can either look for a cryptographic service in your back-end language (ASP.NET, PHP or Node.js) or you can wait until JavaScript starts supporting these features, W3 Consortium is providing these APIs to JavaScript.

You might have to wait for some time, until you get a standard-based framework or API in JavaScript for web applications to perform. You can until then read the Web Cryptography API in Web Development[^] by W3.Org.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Aug-15 22:51pm    
JavaScript per se cannot be "designed" or "not designed" for implementation of certain algorithms. This is a general-purpose computer language, so, naturally, any existing implementation of numerical algorithm can be also implemented in JavaScript. Please see Solution 2.

You are talking about different thing, the application of RSA on the client side of a Web application and, say, its security. Strictly speaking, this is not what our inquirer asked about. The security schema can be different, safe or unsafe, may make no practical sense, and so on. Whatever your considerations are, you cannot deny the sheer fact of possibility of RSA implementation in JavaScript.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900