How to Encrypt Data in Java – How to Encrypt Password in Java

In a Java Enterprise Application, one can store the data in database but it is very much possible to fiddle with the stored data for anyone having access to database. Most particularly when data involved is as critical as password, it becomes extremely important to encrypt data to avoid any security breach.

Java is known for it’s simplicity and easy to use APIs; encryption in Java is very easy using java.security.* package. Below is the piece of code, that can be used right away to encrypt password or any other data before storing it in database.

Example:

Say data to be encryped is “password123″.

Step of encoding however is optional. Base64 encoding schemes are commonly used when there is a need to encode binary data that needs be stored and transferred over media that are designed to deal with textual data. This is to ensure that the data remains intact without modification during transport. So, it’s up to the application’s requirement.

Hope you find this information useful. Please leave your footprints in comments section below for any queries or suggestions…!!

  1. Woah! I’m really enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and appearance. I must say you’ve done a amazing job with this. In addition, the blog loads super fast for me on Chrome. Exceptional Blog!
    Buono Adidas Formazione Luce Rosso Marathon TR Donna [url=http://www.stonecroft-craster.co.uk/images/config.php?Buono-Adidas-Formazione-Luce-Rosso-Marathon-TR-Donna-t-3872_7309.html]Buono Adidas Formazione Luce Rosso Marathon TR Donna[/url]

  2. Hmm it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still new to the whole thing. Do you have any tips and hints for rookie blog writers? I’d genuinely appreciate it.
    Eterno Uomo Arancione 910 [url=http://www.fullerrecycling.co.uk/images/config.php?Elija-moda-Uomo-Arancione-910-t-4551_579.html]Eterno Uomo Arancione 910[/url]

  3. Good day! This is my first comment here so I just wanted to give a quick shout out and say I really enjoy reading your blog posts. Can you recommend any other blogs/websites/forums that go over the same topics? Thanks a ton!
    Tâcher de Adidas Running shoes Running Rouge solaire Noir Gris clair Hommes [url=http://www.boncuisine.co.uk/scripts/config.php?Tâcher-de-Adidas-Running-shoes-Running-Rouge-solaire-Noir-Gris-clair-Hommes-t-3877_5634.html]Tâcher de Adidas Running shoes Running Rouge solaire Noir Gris clair Hommes[/url]

  4. My coder is trying to convince me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using WordPress on several websites for about a year and am anxious about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can import all my wordpress posts into it? Any kind of help would be really appreciated!
    Une meilleure vue de Femmes Adidas Cendres rose Running [url=http://www.haybooksearch.com/images/egklnptwyEGNQT.php?Une-meilleure-vue-de-Femmes-Adidas-Cendres-rose-Running-t-4587_561.html]Une meilleure vue de Femmes Adidas Cendres rose Running[/url]

  5. excellent publish, very informative. I wonder why the other specialists of this sector do not notice this. You must continue your writing. IÕm sure, you have a huge readersÕ base already!

  6. Hola! I’ve been reading your site for a long time now and finally got the courage to go ahead and give you a shout out from Lubbock Texas! Just wanted to say keep up the good job!
    Billig Nike Herre Air Max 2015 Mørkegrå Køligt Grå Løb [url=http://www.christmaspartyuk.co.uk/images/config.php?Original-Nike-Herre-Air-Max-2015-Mørkegrå-Køligt-Grå-Løb-t-4557_623.html]Billig Nike Herre Air Max 2015 Mørkegrå Køligt Grå Løb[/url]

  7. not that much of a online reader to be honest but your blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back later. Many thanks
    Classic Nike Dunk Sky Hi Essential Segla Svart Svart Dam Basket [url=http://www.rurest.co.uk/scripts/config.php?Köpa-Nike-Dunk-Sky-Hi-Essential-Segla-Svart-Svart-Dam-Basket-t-4536_707.html]Classic Nike Dunk Sky Hi Essential Segla Svart Svart Dam Basket[/url]

  8. First off I want to say superb blog! I had a quick question in which I’d like to ask if you do not mind. I was interested to know how you center yourself and clear your head before writing. I’ve had a difficult time clearing my mind in getting my thoughts out. I do enjoy writing but it just seems like the first 10 to 15 minutes are generally wasted simply just trying to figure out how to begin. Any ideas or tips? Cheers!|掲示板}
    Bajocosto Adidas Uomo Funzionante Verde Energy Boost ESM [url=http://www.fullerrecycling.co.uk/images/config.php?Bajocosto-Adidas-Uomo-Funzionante-Verde-Energy-Boost-ESM-t-4551_706.html]Bajocosto Adidas Uomo Funzionante Verde Energy Boost ESM[/url]

  9. Appreciating the time and energy you put into your website and detailed information you provide. It’s nice to come across a blog every once in a while that isn’t the same out of date rehashed information. Excellent read! I’ve saved your site and I’m including your RSS feeds to my Google account.
    Lower price of Adidas Coeur noir Running [url=http://www.lansdown-estates.co.uk/images/config.php?disponibles-en-plusieurs-tailles-Adidas-Coeur-noir-Running-t-4606_401.html]Lower price of Adidas Coeur noir Running[/url]

  10. This is a fantastic website, would you be involved in doing an interview regarding how you designed it? If so e-mail me!
    Réductions New Balance Unisexe Bleu Chaud Baie Rose 420 Trainers [url=http://www.baxthorpe.co.uk/images/config.php?Réductions-New-Balance-Unisexe-Bleu-Chaud-Baie-Rose-420-Trainers-t-4369_1460.html]Réductions New Balance Unisexe Bleu Chaud Baie Rose 420 Trainers[/url]

  11. Hey there! I know this is somewhat off topic but I was wondering which blog platform are you using for this site? I’m getting fed up of WordPress because I’ve had issues with hackers and I’m looking at options for another platform. I would be great if you could point me in the direction of a good platform.
    Design Nike Jogging Svart Free 5.0 Dame [url=http://www.ocitavilla.org/images/config.php?Billige-Sko-Online-Nike-Jogging-Svart-Free-5.0-Dame-t-4664_102.html]Design Nike Jogging Svart Free 5.0 Dame[/url]

  12. This design is steller! You most certainly know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool!
    Large offre Nike Noir Runnings Hommes Air Jordan 6 [url=http://www.cycle-holidays.com/images/config.php?Habile-fabrication-Nike-Noir-Runnings-Hommes-Air-Jordan-6-t-1742_37678.html]Large offre Nike Noir Runnings Hommes Air Jordan 6[/url]

  13. Hello! Do you know if they make any plugins to protect against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any suggestions?
    Chaussure idéale New Balance 890 Running Noir Vert Hommes [url=http://www.unityce.com/images/config.php?Excellente-pas-cher-New-Balance-890-Running-Noir-Vert-Hommes-t-3898_5982.html]Chaussure idéale New Balance 890 Running Noir Vert Hommes[/url]

  14. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get three e-mails with the same comment. Is there any way you can remove people from that service? Thank you!
    Schoenen Nike Running Air Max Ambachtelijke wintertaling Licht retro Vrouwen [url=http://www.webcarmart.co.uk/images/cgjlnqAGNT68.php?Goedkoopste-Nike-Running-Air-Max-Ambachtelijke-wintertaling-Licht-retro-Vrouwen-t-628_40665.html]Schoenen Nike Running Air Max Ambachtelijke wintertaling Licht retro Vrouwen[/url]

  15. Greetings! I’ve been following your blog for a long time now and finally got the courage to go ahead and give you a shout out from Atascocita Texas! Just wanted to mention keep up the fantastic work!
    Welcome to Adidas Womens Training Orange Superstar II [url=http://www.jackdawcottagecornwall.co.uk/images/config.php?Welcome-to-Adidas-Womens-Training-Orange-Superstar-II-t-4132_1582.html]Welcome to Adidas Womens Training Orange Superstar II[/url]

  16. Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!
    Grande remise Tennis [url=http://www.tx3.biz/images/config.php?Ramasser-Tennis-t-1935_45904.html]Grande remise Tennis[/url]

  17. Howdy outstanding website! Does running a blog similar to this require a lot of work? I’ve no knowledge of programming but I had been hoping to start my own blog soon. Anyways, should you have any suggestions or tips for new blog owners please share. I know this is off subject however I just wanted to ask. Kudos!
    Vente chaude New Balance 574 Blanc [url=http://www.sw3locksmith.co.uk/images/config.php?Pour-choisir-New-Balance-574-Blanc-t-4422_2170.html]Vente chaude New Balance 574 Blanc[/url]

  18. Hi there! I know this is somewhat off topic but I was wondering which blog platform are you using for this site? I’m getting fed up of WordPress because I’ve had problems with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.
    La première classe Adidas Hommes Climachill Courir blanc Gris neutre Running [url=http://www.hcaqualityreport.co.uk/images/gimwELZ02.php?La-première-classe-Adidas-Hommes-Climachill-Courir-blanc-Gris-neutre-Running-t-553_44430.html]La première classe Adidas Hommes Climachill Courir blanc Gris neutre Running[/url]

  19. I likе the valuable injfo уou provde for youг articles. I
    will bookmark ʏour weblog ɑnd check ɑgain here
    frequently. ӏ’m гather suгe I will be informed many new stuff proper
    гight here!Good luck for the next!

    My website … bersih 4

  20. I don’t know whether it’s just me or if everybody else experiencing issues with your website. It appears as though some of the text within your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well? This may be a issue with my browser because I’ve had this happen before. Many thanks
    Excellente réduction Adidas Hommes Superstar Coeur noir Running [url=http://www.ocitavilla.org/images/config.php?Excellente-réduction-Adidas-Hommes-Superstar-Coeur-noir-Running-t-4664_206.html]Excellente réduction Adidas Hommes Superstar Coeur noir Running[/url]

  21. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove me from that service? Cheers!
    Faible coût Gris Bleu Unisexe [url=http://www.paulmcgale.co.uk/images/config.php?disponibles-en-plusieurs-tailles-Gris-Bleu-Unisexe-t-4338_648.html]Faible coût Gris Bleu Unisexe[/url]

  22. Together with almost everything that seems to be building throughout this particular subject material, your viewpoints are generally quite refreshing. Even so, I appologize, because I can not give credence to your entire idea, all be it radical none the less. It would seem to us that your opinions are actually not entirely rationalized and in fact you are your self not totally certain of the argument. In any event I did enjoy examining it.
    pas cher sur Internet New Balance Hommes 991 Steve Trianers [url=http://www.nwconsortium.com/images/config.php?pas-cher-sur-Internet-New-Balance-Hommes-991-Steve-Trianers-t-4635_794.html]pas cher sur Internet New Balance Hommes 991 Steve Trianers[/url]

  23. I am curious to find out what blog platform you happen to be using? I’m experiencing some small security problems with my latest website and I’d like to find something more risk-free. Do you have any recommendations?
    Bästa Pris Nike Ljus Ben Svart Running Herr Air Max [url=http://www.portrait-of-our-time.co.uk/images/config.php?Jämför-Priser-Nike-Ljus-Ben-Svart-Running-Herr-Air-Max-t-4467_2480.html]Bästa Pris Nike Ljus Ben Svart Running Herr Air Max[/url]

  24. I don’t know whether it’s just me or if perhaps everybody else experiencing issues with your website. It appears as though some of the written text in your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well? This may be a issue with my browser because I’ve had this happen before. Cheers
    Choisir New Balance Running 659 Gris Hommes [url=http://www.dbphoto.co.uk/images/config.php?Choisir-New-Balance-Running-659-Gris-Hommes-t-4404_1300.html]Choisir New Balance Running 659 Gris Hommes[/url]

  25. Hi! I know this is kinda off topic nevertheless I’d figured I’d ask. Would you be interested in trading links or maybe guest writing a blog article or vice-versa? My website discusses a lot of the same topics as yours and I believe we could greatly benefit from each other. If you’re interested feel free to shoot me an email. I look forward to hearing from you! Terrific blog by the way!
    Cult-classique New Balance 373 Trainers Gris Hommes [url=http://www.blakeycivilengineering.co.uk/images/config.php?Chaussure-idéale-New-Balance-373-Trainers-Gris-Hommes-t-4351_1695.html]Cult-classique New Balance 373 Trainers Gris Hommes[/url]

  26. Woah! I’m really enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between superb usability and visual appeal. I must say you have done a great job with this. Additionally, the blog loads super quick for me on Chrome. Superb Blog!
    avec de nombreuses réductions Adidas Hommes Training Superstar II Gris [url=http://www.proweigh.co.uk/images/config.php?Top-vente-Adidas-Hommes-Training-Superstar-II-Gris-t-4591_2063.html]avec de nombreuses réductions Adidas Hommes Training Superstar II Gris[/url]

  27. Hello! I could have sworn I’ve been to this website before but after browsing through some of the post I realized it’s new to me. Nonetheless, I’m definitely glad I found it and I’ll be bookmarking and checking back frequently!
    Salg Billigt Nike Løb Universitet Rød Sejle Roshe Dame [url=http://www.portrait-of-our-time.co.uk/images/config.php?Salg-Billigt-Nike-Løb-Universitet-Rød-Sejle-Roshe-Dame-t-4467_2357.html]Salg Billigt Nike Løb Universitet Rød Sejle Roshe Dame[/url]

  28. Great site you have here but I was wondering if you knew of any forums that cover the same topics discussed here? I’d really like to be a part of group where I can get opinions from other knowledgeable people that share the same interest. If you have any recommendations, please let me know. Appreciate it!
    Impressionnant Nike Noir [url=http://www.johngreasleyltd.co.uk/images/config.php?Pour-obtenir-d'origine-Nike-Noir-t-4432_4041.html]Impressionnant Nike Noir[/url]

  29. Nearly all of whatever you point out happens to be supprisingly accurate and that makes me wonder why I hadn’t looked at this with this light before. This article really did switch the light on for me personally as far as this topic goes. Nonetheless at this time there is actually just one point I am not necessarily too comfy with and whilst I make an effort to reconcile that with the core theme of the position, let me see exactly what all the rest of the readers have to point out.Nicely done.
    Kopen Nike Running Vrouwen Clearwater Lichtblauwe lak Air Max [url=http://www.rurest.co.uk/scripts/config.php?classic-Nike-Running-Vrouwen-Clearwater-Lichtblauwe-lak-Air-Max-t-4536_977.html]Kopen Nike Running Vrouwen Clearwater Lichtblauwe lak Air Max[/url]

  30. My coder is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the expenses. But he’s tryiong none the less. I’ve been using Movable-type on several websites for about a year and am anxious about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can import all my wordpress content into it? Any kind of help would be greatly appreciated!
    Buena calidad de Blanco Oscuro Rojo Profundo Rosa [url=http://www.sunclean.co.uk/images/config.php?Buen-chico-por-Blanco-Oscuro-Rojo-Profundo-Rosa- -t-1730_19624.html]Buena calidad de Blanco Oscuro Rojo Profundo Rosa[/url]

  31. Do you have a spam problem on this site; I also am a blogger, and I was wondering your situation; we have created some nice methods and we are looking to exchange solutions with other folks, why not shoot me an email if interested.
    Discounted rates Adidas Green Black Adizero F50 Training Mens [url=http://www.brandinabox.net/images/config.php?Discounted-rates-Adidas-Green-Black-Adizero-F50-Training-Mens-t-4562_1069.html]Discounted rates Adidas Green Black Adizero F50 Training Mens[/url]

  32. Please let me know if you’re looking for a article author for your weblog. You have some really great articles and I feel I would be a good asset. If you ever want to take some of the load off, I’d really like to write some articles for your blog in exchange for a link back to mine. Please blast me an e-mail if interested. Thank you!
    Pas cher New Balance Hommes Running Bleu Jaune 1010 [url=http://www.lap-eng.eu/scripts/config.php?Obtenir-New-Balance-Hommes-Running-Bleu-Jaune-1010-t-3819_6868.html]Pas cher New Balance Hommes Running Bleu Jaune 1010[/url]

  33. Admiring the hard work you put into your blog and in depth information you present. It’s great to come across a blog every once in a while that isn’t the same old rehashed information. Great read! I’ve saved your site and I’m including your RSS feeds to my Google account.
    Top Des Ventes Enrichissante Bleu [url=http://www.premierrefrigeration.co.uk/images/config.php?Une-meilleure-vue-de-Bleu-t-4329_762.html]Top Des Ventes Enrichissante Bleu[/url]

  34. Please let me know if you’re looking for a writer for your site. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some articles for your blog in exchange for a link back to mine. Please shoot me an e-mail if interested. Regards!
    Rentable Coeur noir Hommes Running [url=http://mirakliger.co.uk/images/config.php?avec-de-nombreuses-réductions-Coeur-noir-Hommes-Running-t-3902_9066.html]Rentable Coeur noir Hommes Running[/url]

  35. Currently it sounds like Movable Type is the top blogging platform available right now. (from what I’ve read) Is that what you are using on your blog?
    2015 calidad Adidas Superstar II Leopardo Amarillo Marrón Entrenamiento [url=http://www.kernowfuncasino.co.uk/images/eDX12.php?Comprar-auténtico-Adidas-Superstar-II-Leopardo-Amarillo-Marrón-Entrenamiento-t-4527_673.html]2015 calidad Adidas Superstar II Leopardo Amarillo Marrón Entrenamiento[/url]

  36. Please let me know if you’re looking for a article author for your weblog. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d really like to write some content for your blog in exchange for a link back to mine. Please send me an email if interested. Thanks!
    Sko På Nett Nike Jogging Lyse Rød Lys Aqua Lunar Dame [url=http://www.noblecustom.co.uk/images/config.php?Design-Nike-Jogging-Lyse-Rød-Lys-Aqua-Lunar-Dame-t-4482_2117.html]Sko På Nett Nike Jogging Lyse Rød Lys Aqua Lunar Dame[/url]

  37. Thank you, I’ve recently been looking for details about this topic for ages and yours is the best I have located so far.
    Best Adidas Solar Rosa Core Svart Core Svart Jogging Boost Dame [url=http://www.nelpipeband.co.uk/images/config.php?Kjøp -Adidas-Solar-Rosa-Core-Svart-Core-Svart-Jogging-Boost-Dame-t-4673_816.html]Best Adidas Solar Rosa Core Svart Core Svart Jogging Boost Dame[/url]

  38. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your site? My blog site is in the exact same niche as yours and my users would certainly benefit from some of the information you provide here. Please let me know if this alright with you. Many thanks!
    Pour commander nouvelle New Balance [url=http://www.sunnycottage-poole.co.uk/images/config.php?Pour-commander-nouvelle-New-Balance-t-4442_3323.html]Pour commander nouvelle New Balance[/url]

  39. Hello! I could have sworn I’ve been to this site before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be bookmarking and checking back often!
    Prix Lowerst Nike Noir Rouge Air Jordan 4 Femmes Runnings [url=http://www.albion-guesthouse.co.uk/images/config.php?tarif-réduit-Nike-Noir-Rouge-Air-Jordan-4-Femmes-Runnings-t-4360_1062.html]Prix Lowerst Nike Noir Rouge Air Jordan 4 Femmes Runnings[/url]

  40. In the awesome pattern of things you actually receive a B- just for hard work. Where exactly you actually confused me ended up being in all the specifics. As they say, the devil is in the details… And it could not be much more accurate here. Having said that, let me inform you just what did work. The article (parts of it) is actually quite powerful which is most likely why I am taking an effort to opine. I do not make it a regular habit of doing that. 2nd, even though I can easily notice the leaps in reason you make, I am not really confident of just how you seem to unite your ideas that help to make the actual conclusion. For right now I shall subscribe to your issue but hope in the future you actually link your dots better.
    Klær Nike Dame Lunar Grønn Glød Jogging [url=http://www.kdjoiners.co.uk/Images/chmovxADJMNPRU.php?Shop-Nike-Dame-Lunar-Grønn-Glød-Jogging-t-3895_10127.html]Klær Nike Dame Lunar Grønn Glød Jogging[/url]

  41. Hello! Quick question that’s totally off topic. Do you know how to make your site mobile friendly? My site looks weird when viewing from my iphone. I’m trying to find a template or plugin that might be able to resolve this problem. If you have any recommendations, please share. Thank you!
    Bonne conçu Adidas Gris Supernova Hommes Training [url=http://www.nichols-online.co.uk/images/config.php?Stylées-Adidas-Gris-Supernova-Hommes-Training-t-4567_2160.html]Bonne conçu Adidas Gris Supernova Hommes Training[/url]

  42. Have you ever considered publishing an ebook or guest authoring on other websites? I have a blog based upon on the same subjects you discuss and would love to have you share some stories/information. I know my viewers would appreciate your work. If you’re even remotely interested, feel free to shoot me an e-mail.
    Authentieke Nike Wolf grijs Flash kalk Groene gloed Mensen Air Max Running [url=http://www.grosvenorpartitions.co.uk/images/jkvzBFGW13.php?Authentieke-Nike-Wolf-grijs-Flash-kalk-Groene-gloed-Mensen-Air-Max-Running-t-4519_1088.html]Authentieke Nike Wolf grijs Flash kalk Groene gloed Mensen Air Max Running[/url]

  43. Hmm it looks like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I too am an aspiring blog writer but I’m still new to the whole thing. Do you have any points for beginner blog writers? I’d definitely appreciate it.
    Discount Nike Svart Running Air Max Dam [url=http://www.premierdriveways.co.uk/images/config.php?Discount-Nike-Svart-Running-Air-Max-Dam-t-3876_6452.html]Discount Nike Svart Running Air Max Dam[/url]

  44. Hey I am so grateful I found your web site, I really found you by accident, while I was searching on Bing for something else, Nonetheless I am here now and would just like to say kudos for a marvelous post and a all round exciting blog (I also love the theme/design), I don韙 have time to read it all at the moment but I have book-marked it and also added in your RSS feeds, so when I have time I will be back to read more, Please do keep up the superb work.
    Votre Propre Nike Hommes [url=http://www.maywoodmortgages.co.uk/images/config.php?Vérifiez-Nike-Hommes-t-4607_804.html]Votre Propre Nike Hommes[/url]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">