Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-09-2007, 07:54 AM
Member
 
Join Date: Aug 2007
Posts: 2
soul_krasty is on a distinguished road
Java encryption
hello..can anybody help doing this thing.if some one out there are doing something like i did.don't feel shy to discuss.need help ASAP!!!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-09-2007, 11:17 AM
Member
 
Join Date: Jul 2007
Location: England, Bath
Posts: 47
shanePreater is on a distinguished road
I would recommend you look into the java cryptography extension (jce)
JCE main page
Suns JCE guide

Have a read through those and then I have included a simple password encoder which I use quite often to perform simple encryptions:
Code:
package com.onevision.loanmanager.service.helper; import java.security.MessageDigest; import org.apache.log4j.Logger; import sun.misc.BASE64Encoder; public abstract class PasswordEncoder { private static final String CHARACTER_ENCODING = "UTF-8"; private static final String DEFAULT_ALGORITHM = "SHA-256"; private static final Logger LOG = Logger.getLogger(PasswordEncoder.class); public static String encodePassword(String rawPassword) { return encodePassword(rawPassword, DEFAULT_ALGORITHM); } public static String encodePassword(String rawPassword, String encryptionAlgorithm) { MessageDigest md = null; try { md = MessageDigest.getInstance(encryptionAlgorithm); md.update(rawPassword.getBytes(CHARACTER_ENCODING)); byte raw[] = md.digest(); String hash = (new BASE64Encoder()).encode(raw); return hash; } catch (Exception e) { LOG.fatal( "Error encrypting the password so returning plain text: ", e); } return rawPassword; } }
__________________
Shane Preater -
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-14-2007, 08:22 AM
Member
 
Join Date: Aug 2007
Posts: 2
soul_krasty is on a distinguished road
Hello..
finally i have install bouncycastle..although i dunno what it will do..actually i am building a java file encrypter.the file that i need to encrypt such as image..mp3..video..small file only..can anu body help me with this.i am using netbean 5
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-14-2007, 04:44 PM
Member
 
Join Date: Aug 2007
Posts: 1
khushi is on a distinguished road
Java programmer can send resume for very good openings on khushi_smile31@yahoo.com
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
encryption Joe2003 Advanced Java 2 02-06-2008 12:27 PM
Encryption/Decryption Echilon New To Java 0 12-27-2007 03:55 PM
Encryption/Decryption Through AOP SirRawlins Advanced Java 0 12-19-2007 05:22 PM
Encryption in java Ed Advanced Java 1 07-09-2007 03:47 AM


All times are GMT +3. The time now is 11:41 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org