• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Java and Javascript intearaction

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way out to use RSA or some other crypto algorithm to encrypt/decrypt string/text in javascript/java, and vice versa.
What I mean is, if I encrypt a string in jsp (using javascript, @ on formSubmit), pass it to action class, and now how can i decrypt it in my java code?
 
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"ashi", please check your private messages for an important administrative matter.
 
Bear Bibeault
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I really don't see how JavaScript enters into your question. You encrypt on the server, and decrypt next time on the server as well.
[ June 02, 2008: Message edited by: Bear Bibeault ]
 
ashi roy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I mean is, I have a login.jsp, on form submit I would like to encrypt the password and once the password reaches to the form controller or action class, I would like to decrypt it back. Is it possible to have javascript encryption (RSA or something similar) and using the same same algorith in a java class to decrypt it??
 
Bear Bibeault
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would you want to encrypt it on the client? That makes no sense since the script is visible to anyone on the net.

If want to protect a password during transmission, that's what SSL is for.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Edit: thread hijack removed. Please ask your own questions in a new post]
[ June 03, 2008: Message edited by: Bear Bibeault ]
 
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic