Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2

    Object Array Serialization Encryption


    Object Array Serialization Encryption
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Dallas, TX
    Posts
    50
    Rep Power
    2
    I would suggest taking a look at the javax.crypto libraries. They should help you accomplish what you need. There are numerous tutorials and examples out there, and this StackOverflow post may offer a bit of help as well:

    http://stackoverflow.com/questions/4...t-data-in-java
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    I've tried lots of tutorials but can't get any of them working, how would I seal and unseal objects with a password?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Dallas, TX
    Posts
    50
    Rep Power
    2
    Originally Posted by 0w1
    I've tried lots of tutorials but can't get any of them working, how would I seal and unseal objects with a password?
    I know what you mean, actually. I'll be honest in that I have had difficulties with the Crypto libraries when trying to do simple things such as just encrypt an object or string with a simple Salt. Let me dig around a bit to see if I can find a good example that would suit your purposes. It seems, from your post, that you are simply trying to encrypt the "LoanAccount" object, and decrypt it, based on a hash string / salt, or "password", as you put it?
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    Originally Posted by BlastPort
    I know what you mean, actually. I'll be honest in that I have had difficulties with the Crypto libraries when trying to do simple things such as encrypt an object or string. Let me dig around a bit to see if I can find a good example that would suit your purposes. It seems, from your post, that you are simply trying to encrypt the "LoanAccount" object, and decrypt it, based on a hash string / salt, or "password", as you put it?
    Yea, atm I'm looking at BouncyCastle libraries but I'm struggling to understand how to import it for my needs. Thanks pal, much appreciated.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Dallas, TX
    Posts
    50
    Rep Power
    2
    Originally Posted by 0w1
    Yea, atm I'm looking at BouncyCastle libraries but I'm struggling to understand how to import it for my needs. Thanks pal, much appreciated.
    Well, for importing the classes properly, you'll need to import the jce.jar file, which should be a part of the JDK. Are you seeing that available?
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    Originally Posted by BlastPort
    Well, for importing the classes properly, you'll need to import the jce.jar file, which should be a part of the JDK. Are you seeing that available?
    I downloaded jasypt-1.9.0 and I'm guessing its import is icu4j-3.4.4 but I don't know what to import for the source.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    I've imported bcprov-jdk15on-149.

    http://www.bouncycastle.org/latest_releases.html
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Dallas, TX
    Posts
    50
    Rep Power
    2
    Originally Posted by 0w1
    I've imported bcprov-jdk15on-149.

    http://www.bouncycastle.org/latest_releases.html
    Cool, my apologies if the jce.jar steered you in the wrong direction, as things may have changed recently. Does the following example for DES encryption/decryption help at all, for the project on which you're working?

    http://examples.javacodegeeks.com/co...ject-with-des/
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    Originally Posted by BlastPort
    Cool, my apologies if the jce.jar steered you in the wrong direction, as things may have changed recently. Does the following example for DES encryption/decryption help at all, for the project on which you're working?

    http://examples.javacodegeeks.com/co...ject-with-des/
    No problem, tried that tutorial, crashed or didn't decrypt the objects. I'm trying: (but I'm having problems with PBEParameterSpec and PBEKeySpec).

    http://nakkaya.com/2009/10/16/passwo...ion-using-aes/
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Dallas, TX
    Posts
    50
    Rep Power
    2
    Going to see if I can setup the same. I only have access to an Android-based mobile project at the moment, but it should be the same concept. I'll see if I can get it working with a custom object
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    Originally Posted by BlastPort
    Going to see if I can setup the same. I only have access to an Android-based mobile project at the moment, but it should be the same concept. I'll see if I can get it working with a custom object
    I got the DES tutorial working in its own class, I'll try to get it working with the project now.
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Location
    Dallas, TX
    Posts
    50
    Rep Power
    2
    Originally Posted by 0w1
    I got the DES tutorial working in its own class, I'll try to get it working with the project now.
    Nice! I'm still struggling a bit with implementing, but it's mostly due to some IDE issues. Still working through it, though. Sounds like you're making good progress. Sorry for my lack of help on the specifics
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    Originally Posted by BlastPort
    Nice! I'm still struggling a bit with implementing, but it's mostly due to some IDE issues. Still working through it, though. Sounds like you're making good progress. Sorry for my lack of help on the specifics
    Keep hitting a brick wall, don't worry about it mate.
  28. #15
  29. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    37
    Rep Power
    2
    Back to Password Based Encryption Using AES, just have to figure out how to convert an object to a string and back.
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo