Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



java encryption ? PLEASE?


16 replies to this topic - - - - -

#1 SPEhosting

    C++ n00b

  • 2,443 posts
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 25 October 2012 - 20:11

hello I just need some help encrypting strings... thats all!! encrypt using a key dont mind what method hopfully a hard to crack one :D AES or swordfish I dont mind please give examples of use :D TY


#2 El Marto

    Serial Lurker

  • 597 posts
  • Joined: 07-October 04
  • Location: Bucks, England

Posted 26 October 2012 - 06:53

http://lmgtfy.com/?q...+encryption&l=1

Enjoy :)

#3 OP SPEhosting

    C++ n00b

  • 2,443 posts
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 26 October 2012 - 12:29

View PostEl Marto, on 26 October 2012 - 06:53, said:


if you are not going to be useful stop insulting my intelligence and get off the forums... Im sick of people like you, I have obviously googled it and I found an ecryption method or two most of which are not any help to me... if i have come to the forums it means google just is not working out

#4 Asrokhel

    Resident Elite

  • 1,027 posts
  • Joined: 05-April 12
  • OS: Windows 8 Pro x64 (testing to see if I keep it or go back to Windows 7)

Posted 26 October 2012 - 12:32

Why not post your question on:

http://stackoverflow.com

Or:

http://www.experts-exchange.com/

#5 Intrinsica

    Neowinian DOMINATING

  • 8,844 posts
  • Joined: 28-June 04
  • Location: Switzerland

Posted 26 October 2012 - 13:14

View PostSPEhosting, on 26 October 2012 - 12:29, said:

if you are not going to be useful stop insulting my intelligence and get off the forums... Im sick of people like you, I have obviously googled it and I found an ecryption method or two most of which are not any help to me... if i have come to the forums it means google just is not working out
In fairness, you didn't provide too much information in your original post. If you have tried using Google, where did you encounter a problem?

#6 nik louch

    ..:::..:::..:::..

  • 31,395 posts
  • Joined: 14-January 03
  • Location: Leicester, UK
  • OS: Windows 7, OSX, Android, Ubuntu
  • Phone: Galaxy Note II

Posted 26 October 2012 - 13:20

Quote

I have obviously googled it
Based upon...

#7 geekyscott

    Neowinian

  • 10 posts
  • Joined: 20-January 12
  • Location: Edinburgh
  • OS: OSX Lion/Windows 7

Posted 26 October 2012 - 13:23

Everyone on this site seems to be so up their own arse. I don't see the point replying with a negative comment when it would take the same length of time to post a positive one. Without people posting the community and effectively Neowin would be dead.

To the OP, take a look at DES encryption: http://www.mkyong.co...d-des-tutorial/.

Also, take a look at : http://www.java2s.co...ecurity/DES.htm

#8 geekyscott

    Neowinian

  • 10 posts
  • Joined: 20-January 12
  • Location: Edinburgh
  • OS: OSX Lion/Windows 7

Posted 26 October 2012 - 13:29

View Postnik louch, on 26 October 2012 - 13:20, said:

Based upon...

I have seen a number of your comments on this board and you come across as a complete 133test tosser. Every one of your posts I have seen seem to be negative, de-constructive and completely unhelpful. Why? Why do you use this board? Neowin markets itself as a friendly community. Not everyone is at the same level, some people are still learning and you should feel privileged that they are turning to Neowin for help rather than stack overflow and the likes (i also find it hilarious someone posted links to another site telling them to ask there). Inst that the bloody point?!

#9 Intrinsica

    Neowinian DOMINATING

  • 8,844 posts
  • Joined: 28-June 04
  • Location: Switzerland

Posted 26 October 2012 - 13:33

View Postgeekyscott, on 26 October 2012 - 13:29, said:

I have seen a number of your comments on this board and you come across as a complete 133test tosser. Every one of your posts I have seen seem to be negative, de-constructive and completely unhelpful. Why? Why do you use this board? Neowin markets itself as a friendly community. Not everyone is at the same level, some people are still learning and you should feel privileged that they are turning to Neowin for help rather than stack overflow and the likes (i also find it hilarious someone posted links to another site telling them to ask there). Inst that the bloody point?!
I've only just become a moderator so I'm not going to do anything, but if you have a problem with a user you should do it with a PM, not go off-topic in a thread. (Y)

#10 geekyscott

    Neowinian

  • 10 posts
  • Joined: 20-January 12
  • Location: Edinburgh
  • OS: OSX Lion/Windows 7

Posted 26 October 2012 - 13:33

View PostIntrinsica, on 26 October 2012 - 13:33, said:

I've only just become a moderator so I'm not going to do anything, but if you have a problem with a user you should do it with a PM, not go off-topic in a thread. (Y)

I don't want to be part of this 'community'. Just delete my account thanks.

#11 OP SPEhosting

    C++ n00b

  • 2,443 posts
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 26 October 2012 - 17:53

ok here is some more information maybe you can help me ... I have now encrypted the messaged yay.... BUT i want to use a key i have chosen rather then the keygenerator ... i am having some issues with this though can anyone please show me a way to encrypt using my own desired key as I wish to decrypt and my program requires the old corn chicken and fox so encryptions have to be correct and the same

#12 togermano

    hot top for the bottoms

  • 425 posts
  • Joined: 29-December 02
  • Location: MA,USA
  • OS: win98se(For real)

Posted 26 October 2012 - 20:56

View Postgeekyscott, on 26 October 2012 - 13:29, said:

I have seen a number of your comments on this board and you come across as a complete 133test tosser. Every one of your posts I have seen seem to be negative, de-constructive and completely unhelpful. Why? Why do you use this board? Neowin markets itself as a friendly community. Not everyone is at the same level, some people are still learning and you should feel privileged that they are turning to Neowin for help rather than stack overflow and the likes (i also find it hilarious someone posted links to another site telling them to ask there). Inst that the bloody point?!

Well said and because nik posts all the time the owners like him even thou most of his posts are crap and offending other members

View PostIntrinsica, on 26 October 2012 - 13:33, said:

I've only just become a moderator so I'm not going to do anything, but if you have a problem with a user you should do it with a PM, not go off-topic in a thread. (Y)

We are sick of it he comes in alot of peoples threads and trashes them.... WHy don't you mods do something about it? If I could tell him off without getting a warning I would.

#13 SirEvan

    Neowinian Wise One

  • 3,282 posts
  • Joined: 17-April 03
  • Location: Santa Clara, CA
  • OS: Windows 8
  • Phone: HTC One X (AT&T)

Posted 30 October 2012 - 20:39

View PostSPEhosting, on 26 October 2012 - 12:29, said:

if you are not going to be useful stop insulting my intelligence and get off the forums... Im sick of people like you, I have obviously googled it and I found an ecryption method or two most of which are not any help to me... if i have come to the forums it means google just is not working out

I agree with him however, A simple search for "JAVA AES128 Encryption" on google yields countless working results on how to encrypt strings. Also as mentioned, stackoverflow is a great asset, as is providing more information on what you're trying to accomplish. "HLP MEEZ!" usually does not yield useful answers from the community.

Here's a freebee. Why not tell us if you're just trying to encrypt, such as store in a database, or if you want to encrypt to transmit. One could use AES128, the other would use SSL. Nobody can tell you how to encrypt your strings if you don't tell us the context and how you're using encryption.

Here's your freebee, that took me 2 seconds on google.:

http://www.javamex.c...symmetric.shtml

In case you're wondering how I found this so quickly,

#14 OP SPEhosting

    C++ n00b

  • 2,443 posts
  • Joined: 15-July 08
  • Location: my room
  • OS: windows 7, backtrack 5, OSx 10.6

Posted 30 October 2012 - 20:57

View PostSirEvan, on 30 October 2012 - 20:39, said:

I agree with him however, A simple search for "JAVA AES128 Encryption" on google yields countless working results on how to encrypt strings. Also as mentioned, stackoverflow is a great asset, as is providing more information on what you're trying to accomplish. "HLP MEEZ!" usually does not yield useful answers from the community.

Here's a freebee. Why not tell us if you're just trying to encrypt, such as store in a database, or if you want to encrypt to transmit. One could use AES128, the other would use SSL. Nobody can tell you how to encrypt your strings if you don't tell us the context and how you're using encryption.

Here's your freebee, that took me 2 seconds on google.:

http://www.javamex.c...symmetric.shtml

In case you're wondering how I found this so quickly,

i will look at your links thanks for the help ... I am making a 2 way chat client (p2p) and i am encrypting the messages ... but before the chat can be secure I have to get an encryption code to both parties ....

so what i need to do is take and encryption key and encrypt it with a different key ... then send it to person B person B then encrypts the encrypted key with there encryption key... they then send it back ... person A (me) then removes the original encryption placed upon it leaving only person Bs encryption on the key.... person A is then meant to send it back to B so they can remove their encryption to see the shared encryption key so they can talk securely... :)

#15 SirEvan

    Neowinian Wise One

  • 3,282 posts
  • Joined: 17-April 03
  • Location: Santa Clara, CA
  • OS: Windows 8
  • Phone: HTC One X (AT&T)

Posted 31 October 2012 - 15:24

View PostSPEhosting, on 30 October 2012 - 20:57, said:

i will look at your links thanks for the help ... I am making a 2 way chat client (p2p) and i am encrypting the messages ... but before the chat can be secure I have to get an encryption code to both parties ....

so what i need to do is take and encryption key and encrypt it with a different key ... then send it to person B person B then encrypts the encrypted key with there encryption key... they then send it back ... person A (me) then removes the original encryption placed upon it leaving only person Bs encryption on the key.... person A is then meant to send it back to B so they can remove their encryption to see the shared encryption key so they can talk securely... :)

Why do you want to encrpyt the actual message? if you use SSL in your p2p app, then the entire communication is encrpyted, and nobody would be able to read the message. This saves you having to:

1.) Share encryption keys
2.) add code/time/complexity to en/decrypt messages each time they get sent.

Why re-invent security when you can easily use an SSL connection between your clients/apps to secure the ENTIRE connection. I asked this same question on stack overflow the other day, as I was thinking of using AES128 to encrypt user names being sent over http. I was later convinced by users to just go with an SSL connection for the entire session.