alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

/*******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

This is a JNI bridge to access native Windows encryption methods from Java. The methods
perform user-specific encryption of the data. The same user can later decrypt data using 
methods provided by this DLL. A different user won't be able to decrypt the data. 

If the user has a roaming profile, he can decrypt data on a different computer in the domain.

In the event if stand-alone computer needs to have OS re-installed (or the domain controller
and the computer in the domain), be sure to create Windows password recovery disk BEFORE 
re-installing the operating system.

Note that this mechanism is intended to be used with small size data (i.e., passwords). For 
large amount of data consider encrypting your password using this mechanism and using 
symmetric encryption to encrypt the data.

To compile this DLL:
=> JAVA_HOME environment variable needs to be setup so that jni.h can be found

Note C++ projects settings:
=> Additional include directories - "$(JAVA_HOME)/include";"$(JAVA_HOME)/include/win32"
=> Additional linker dependency - Crypt32.lib
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.