|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.jdpapi.DataProtector
public class DataProtector
An interface to the Microsoft Data Protection API (DPAPI).
See MSDN for more information
| Constructor Summary | |
|---|---|
DataProtector()
Initializes the protector with no additional entropy and localMachine set to false |
|
DataProtector(boolean localMachine)
|
|
DataProtector(byte[] entropy)
|
|
DataProtector(byte[] entropy,
boolean localMachine)
|
|
| Method Summary | |
|---|---|
byte[] |
protect(java.lang.String input)
Protect input using the Microsoft DPAPI CryptProtectData function. |
java.lang.String |
unprotect(byte[] input)
Unprotect input using the Microsoft DPAPI CryptUnprotectData function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataProtector(byte[] entropy,
boolean localMachine)
entropy - Additional entropy to include when encrypting (optional)localMachine - If true, allow all users on the machine to decrypt a given ciphertextpublic DataProtector(byte[] entropy)
entropy - DataProtector(byte[], boolean)public DataProtector(boolean localMachine)
localMachine - DataProtector(byte[], boolean)public DataProtector()
localMachine set to false
DataProtector(byte[], boolean)| Method Detail |
|---|
public byte[] protect(java.lang.String input)
Protect input using the Microsoft DPAPI CryptProtectData function.
See the CryptProtectData documentation for more details
input - Plaintext to encrypt
public java.lang.String unprotect(byte[] input)
Unprotect input using the Microsoft DPAPI CryptUnprotectData function.
See the CryptUnprotectData documentation for more details
input - Ciphertext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||