[Show all top banners]

Ayus
Replies to this thread:

More by Ayus
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 IT -- Solutions Center[Forum]

[Please view other pages to see the rest of the postings. Total posts: 182]
PAGE: <<  1 2 3 4 5 6 7 8 9 10 NEXT PAGE
[VIEWED 76090 TIMES]
SAVE! for ease of future access.
The postings in this thread span 10 pages, View Last 20 replies.
Posted on 02-14-11 10:39 PM     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 


Shoot out your problems...
Lets share and expand the knowledge.....!!!!



We are open to share on(any IT related stuffs) :

- Javascript/JQuery/Ajax
- Java,JSP,Servlets and Frameworks
- WebServices
- Unix, Linux, Webserver Administration


+ many more !!!!

 
Posted on 02-19-11 11:01 PM     [Snapshot: 994]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

framework used: Struts and Hibernate
database : oracle 10

how can I hash the password before I store it in db?
 
Posted on 02-19-11 11:10 PM     [Snapshot: 998]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hash a password??
Can you explain more clearly ??

 
Posted on 02-19-11 11:16 PM     [Snapshot: 999]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I mean I dont want to store password directly to database, but want to store hash or one way encrypted value in database.
 
Posted on 02-20-11 12:17 AM     [Snapshot: 1011]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

// sample code--//copy paste these two class to see how it works

import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import sun.misc.BASE64Encoder;
 
public class EncyptionTest {
    public static synchronized String encrypt(String txt_to_excrypt, String algorithm_used_for_encryption) throws Exception {
        MessageDigest msgDigest = null;
        String hashValue = null;
        try {
            msgDigest = MessageDigest.getInstance(algorithm_used_for_encryption);
            msgDigest.update(txt_to_excrypt.getBytes("UTF-8"));
            byte rawByte[] = msgDigest.digest();
            hashValue = (new BASE64Encoder()).encode(rawByte);
        } catch (NoSuchAlgorithmException e) {
            System.out.println("No Such Algorithm Exists");
        }
        return hashValue;
    }
}

// test the above class

public class TestEncryption {
  public static void main(String[]args){
      try {
            String encryptedPassword = new EncyptionTest().encrypt("password", "SHA"); //using SHA algo
            String encryptedPassword1 = new EncyptionTest().encrypt("password", "MD5");//using MD5
            System.out.println("Encrypted Password:\t"+encryptedPassword);
            System.out.println("Encrypted Password-MD5:\t"+encryptedPassword1);

        } catch (Exception ex) {
        }
}}

//output
Encrypted Password:        W6ph5Mm5Pz8GgiULbPgzG37mj9g=
Encrypted Password-MD5:        X03MO1qnZdYdgyfeuILPmQ==

/*    while using struts *****************************/
- create a seperate java class for encryption like i did
- create a instance of that class in action class
- pass the received password from form bean to encrypt method like above and get the result in some variable
- store that variable in database ....will be saved as encrypted password


Last edited: 20-Feb-11 12:20 AM
Last edited: 20-Feb-11 01:08 AM
Last edited: 20-Feb-11 01:21 AM
Last edited: 20-Feb-11 01:23 AM

 
Posted on 02-20-11 2:02 AM     [Snapshot: 1044]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

thx,
was looking for this :)

 
Posted on 02-20-11 11:27 AM     [Snapshot: 1079]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

NP. Keep posting ....

 
Posted on 02-20-11 9:00 PM     [Snapshot: 1123]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 


Oracle just realased most Sophisticated High Availability (HA) weblogic tools called WebCenter Suite.

It is just an Oracle Fusion Middleware and a mix of existing Oracle software along with the various products from BEA.

thanks
Last edited: 20-Feb-11 09:23 PM

 
Posted on 02-21-11 11:46 AM     [Snapshot: 1187]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

if you want to code, you can go with Ayus, also heard MD5 is not that good for password protection, try using sha digests.
I found some inbuilt functionality with mysql (always easier and less error prone to use inbuilt api)
src:http://mysqldatabaseadministration.blogspot.com/2006/08/storing-passwords-in-mysql.html

You can apply SHA1 algorithm to a password string:

mysql>  SELECT SHA1('mysecretpassword');
+------------------------------------------+
| SHA1('mysecretpassword') |
+------------------------------------------+
| 08cd923367890009657eab812753379bdb321eeb |
+------------------------------------------+
1 row in set (0.00 sec)


Since SHA is an alias for SHA1, it produces the same result
mysql>  SELECT SHA('mysecretpassword');
+------------------------------------------+
| SHA('mysecretpassword') |
+------------------------------------------+
| 08cd923367890009657eab812753379bdb321eeb |
+------------------------------------------+
1 row in set (0.00 sec)


To store passwords encrypted with SHA1, we need to be able to store 40 characters.
mysql> SELECT CHARACTER_LENGTH(SHA1('mysecretpasswordsssssss'));
+---------------------------------------------------+
| CHARACTER_LENGTH(SHA1('mysecretpassword')) |
+---------------------------------------------------+
| 40 |
+---------------------------------------------------+
1 row in set (0.00 sec)


On the other hand, to store passwords encrypted with MD5, we need the column to be able to hold 32 characters.

mysql>  SELECT MD5('secretpassword');
+----------------------------------+
| MD5('secretpassword') |
+----------------------------------+
| 2034f6e32958647fdff75d265b455ebf |
+----------------------------------+
1 row in set (0.00 sec)

mysql> SELECT CHARACTER_LENGTH(MD5('secretpassword'));
+-----------------------------------------+
| CHARACTER_LENGTH(MD5('secretpassword')) |
+-----------------------------------------+
| 32 |
+-----------------------------------------+
1 row in set (0.00 sec)
Didnt find much on oracle except for following http://psoug.org/reference/dbms_crypto.html Good luck

 
Posted on 02-22-11 10:46 AM     [Snapshot: 1245]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Simple WebSerice tutorial on Netbeans:

https://www.youtube.com/watch?v=HSajTWlDnhk

 
Posted on 02-23-11 9:05 AM     [Snapshot: 1312]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

JSTL TUTORIAL:

http://www.herongyang.com/jsp/jstl.html

 
Posted on 02-24-11 6:13 AM     [Snapshot: 1360]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Nice tutorial on JSF is available on coreservlet.com . just google jsf tutorial and search for coreservlet. Tutorials are available in pdf format . No prior experience required. Nice one
 
Posted on 02-24-11 1:32 PM     [Snapshot: 1389]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Real Time Development [ basic things to know ]

- setting up exisitng project in your IDE  - very important
- build tool (preferably Ant) - - will be used extensively
- logging framework (log4j) --- will be used extensively
- creating and reading logs -- will be used extensively
- ability to dig code - very important to get the flow as codes will be pretty much spread out
- version control [atleast checkin/checkout] -- very important as you might have to do check out the project  you would be working on.
- basic knowledge of webserver -- for deploying / restarting

 
Posted on 02-24-11 4:07 PM     [Snapshot: 1411]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I think , we cann add
knowledge on  some kind of testing like Unit Testing and
basics of SDLC


 
Posted on 02-24-11 5:04 PM     [Snapshot: 1433]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

pretty much !! Unit testing on your system is very important too but unit testing doesnt need to use JUnit.
If Junit can be used, awesome.
Java classes can be tested by creating object of the classes and calling related methods.
On Client side,  i have seen everyone using IE7.



 
Posted on 02-25-11 6:22 PM     [Snapshot: 1506]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I was trying to learn tiles in struts1.3. I have used client side validations too.
When client side validation fails, the page is returned as independent page ( ignores the layout of tiles). With no client side validation, it works fine.
Any suggestion on how to fix that?


 
Posted on 02-25-11 7:29 PM     [Snapshot: 1518]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I would prefer to display the validation error on the same page rather than displaying on another page.
If you want to display error on different page, then you have make that page extend to baselayout.

Follow the link,
http://vaannila.com/struts/struts-example/struts-tiles-example-1.html

but i prefer displaying error on the same page itself.



 
Posted on 02-25-11 8:33 PM     [Snapshot: 1527]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thanks for the immediate response. I displayed the error on same page, but coz of tiles, during display time, it didnot maintain the layout.
Just figured it, now feeling like a dumb

 
Posted on 02-26-11 12:34 AM     [Snapshot: 1550]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Ayus, Do you have any information on free subversion that supports struts/hibernate?


 
Posted on 02-26-11 12:40 AM     [Snapshot: 1548]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

are u using submit type in button?
i assume it displays the error msg first and goes to another page.

- remove ur seperate page tat u r currently using for error msg.
- chk the flow after u clik on submit button...
   it shd go thru ur validation and if validation fails it shd return false....& stay on same page

- if possible,use javascript for form submission....

 
Posted on 02-28-11 10:25 AM     [Snapshot: 1629]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Subversion is a open source and free.
Download server and client(TortoiseSVN) and you can play in you local. I guess version contols have nothing to do with any frameworks.


 



PAGE: <<  1 2 3 4 5 6 7 8 9 10 NEXT PAGE
Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 200 days
Recommended Popular Threads Controvertial Threads
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
शीर्षक जे पनि हुन सक्छ।
What are your first memories of when Nepal Television Began?
Sajha Poll: नेपालका सबैभन्दा आकर्षक महिला को हुन्?
ChatSansar.com Naya Nepal Chat
NRN card pros and cons?
Basnet or Basnyat ??
निगुरो थाहा छ ??
Nas and The Bokas: Coming to a Night Club near you
TPS Re-registration
अमेरिकामा छोरा हराएको सूचना
ओच्छ्यान मुत्ने समस्या ( confession )
Do nepalese really need TPS?
TPS Re-registration case still pending ..
Drawback for applying NRN card
Breathe in. Breathe out.
nrn citizenship
Democrats are so sure Trump will win
ढ्याउ गर्दा दसैँको खसी गनाउच
My facebook archive (for sale)
Nas and The Bokas: Coming to a Night Club near you
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
Harvard Nepali Students Association Blame Israel for hamas terrorist attacks
TPS Update : Jajarkot earthquake
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters