|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jimischopp.msdpapi.MSDPAPIJava
public class MSDPAPIJava
A JNI wrapper around the MS DPAPI Encryption library. Encrypts/Decrypts strings using the Microsoft DPAPI library (in Crypt32.dll). This has the restriction that the original string must be decrypted on the same machine it was encrypted on, since the MSDPAPIJava library uses the Machine-level store.
To use this API (obviously only on Windows), simply place MSDPAPIJava.dll in your library path,
and then include/call the static methods on this class. For example:
would render something similar to:
System.out.println(com.jimischopp.msdpapi.MSDPAPIJava.CryptProtectData("lalafdsfds"));
and passing this long cypher-text to CryptUnprotectData would again yield the original "lalafdsfds".
AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA6cdt4K6RPUOd0SuEQ3rAIgQAAAAKAAAAVzJLRHVtbXkAAANmAACoAAAAEAAAAEP7/vnKVT6
Copyright 2004, James Schopp
Constructor Summary | |
---|---|
MSDPAPIJava()
|
Method Summary | |
---|---|
static java.lang.String |
CryptProtectData(java.lang.String clearText)
Encrypts a string using the MS DPAPI Machine-level encryption key. |
static java.lang.String |
CryptUnprotectData(java.lang.String cypherText)
Unencrypts a cyphertext string using the MS DPAPI Machine-level encryption key. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MSDPAPIJava()
Method Detail |
---|
public static java.lang.String CryptProtectData(java.lang.String clearText)
clearText
- the original clear text
public static java.lang.String CryptUnprotectData(java.lang.String cypherText)
cypherText
- the encrypted text
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |