XCoders.net

Programming stuff

How can I encrypt user password in my Java application?

When you code an application that has a user log-in, you must use encryption. Encryption protects your members who use your application in case of any unauthorized access to members table in database. Firstly members

may use the same password in another web site, it’s quiet common that a lot of user use only one password for all sites. Secondly, even if you can prevent unauthorized access to your database, hackers can still access your members’ information with the passwords they obtained. If you want to learn more about “why do I have to encrypt user password?” you can read this discussion in stackexchange.

 

So, how can I encrypt password?

You can find a lot of encryption libraries to use in Java. I use Jaspyt library in my Java projects .

You can find some features for Jaspyt below:

  • High-security, standards-based encryption techniques, both for unidirectional and bidirectional encryption. Encrypt passwords, texts, numbers, binaries…
  • Transparent integration with Hibernate.
  • Suitable for integration into Spring-based applications and also transparently integrable with Spring Security.
  • Integrated capabilities for encrypting the configuration of applications (i.e. datasources).
  • Specific features for high-performance encryption in multi-processor/multi-core systems.
  • Open API for use with any JCE provider.

How to use Jaspyt in java projects?

Firstly you have to download Jaspyt files from Jaspyt web site. Then you must add jar file named jasypt-1.9.2 to your project. (1.9.2 is version number, your number may be different.) Add the following lines to your projects.

 

It’s easy, huh.

With Jasypt, checking a password can be as simple as…

 

If you use better libraries than Jasypt you can leave a comment below.

Onder

Starting MySQL from the Windows Command Line

to start :

shell> C:\Your Mysql Server Path\bin\mysqld

to stop :

shell> C:\Your Mysql Server Path\bin\mysqladmin -u root shutdown

 

Source : dev.mysql.com

 

My Development Tools : Wamp Server

wamp-pannel

WAMP is a windows web development environment that allows you to create web applications with Apache , Php Mysql. (Windows – Apache – Php – Mysql ).  You can install it after you download a compatible file from http://www.wampserver.com/en/ . Wamp is very easy to install and takes about an avarage of 5 minutes to complete depending on your computer’s hardware configuration. If there is an IIS (internet information server) or another application using port 80 already installed, wamp server won’t start apache server after installation. To solve this problem you can change the port used by Apache Server.

How can I change Apache Port in WAMP?

To do this, open http.conf file in wamp directory with text editor. (C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf this is my directory path, your path may be a little different). And change Listen 0.0.0.0:80Listen [::0]:80 lines to Listen 0.0.0.0:8888Listen [::0]:8888. Then click “restart all services” button on Wamp Server tryicon menu. That’s all.

You can test new port with the following Url : http://localhost:8888/

Onder

The Science of Productivity

XCoders Site Seo Analyzer

site seo analyzer

Hi all,

I developed an application for web site tag analyze, I called it XCoders Site Seo Analyzer. This program can help you to analyze your html tags in your web site. You can see a, img, h1, h2 tag list with details. You can see  broken links in the warning list.

I uploaded the application in sf.net and I licensed it with MIT license. So you can use it free for personal or commercial use.

Today I’ve got a mail from softpedia. They reviewed my application and they created a  download page with a review attached for my application. Thanks Michaela Citeo for the review, I couldn’t have explained it like her :)

You can  click here to see my application review and you can download it from softpedia.

Or you can click here to download directly from sf.net.

If you have any questions you can contact me : onder@xcoders.net

Cheers.

Onder

Powered by WordPress & Theme by Anders Norén