Overview | Package | Class | Tree | Deprecated | Index | Help
| JNA API 3.3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jna.platform.win32
Class Crypt32Util

    java.lang.Object
      com.sun.jna.platform.win32.Crypt32Util

    public abstract class Crypt32Util

extends Object

Crypt32 utility API.

Author:
  dblock[at]dblock.org

Constructor Summary
`Crypt32Util()`

Method Summary
`static byte[]` | `cryptProtectData(byte[] data)` Protect a blob of data.
`static byte[]` | `cryptProtectData(byte[] data, byte[] entropy, int flags, String description, WinCrypt.CRYPTPROTECT_PROMPTSTRUCT prompt)` Protect a blob of data.
`static byte[]` | `cryptProtectData(byte[] data, int flags)` Protect a blob of data with optional flags.
`static byte[]` | `cryptUnprotectData(byte[] data)` Unprotect a blob of data.
`static byte[]` | `cryptUnprotectData(byte[] data, byte[] entropy, int flags, WinCrypt.CRYPTPROTECT_PROMPTSTRUCT prompt)` Unprotect a blob of data.
`static byte[]` | `cryptUnprotectData(byte[] data, int flags)` Unprotect a blob of data.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Crypt32Util

    public Crypt32Util()

Method Detail

### cryptProtectData

    public static byte[] cryptProtectData(byte[] data)

  Protect a blob of data.

  Parameters:
    `data` - Data to protect.
  Returns:
    Protected data.

### cryptProtectData

    public static byte[] cryptProtectData(byte[] data,
                                          int flags)

  Protect a blob of data with optional flags.

  Parameters:
    `data` - Data to protect.
    `flags` - Optional flags, eg. CRYPTPROTECT_LOCAL_MACHINE | CRYPTPROTECT_UI_FORBIDDEN.
  Returns:
    Protected data.

### cryptProtectData

    public static byte[] cryptProtectData(byte[] data,
                                          byte[] entropy,
                                          int flags,
                                          String description,
                                          WinCrypt.CRYPTPROTECT_PROMPTSTRUCT prompt)

  Protect a blob of data.

  Parameters:
    `data` - Data to protect.
    `entropy` - Optional entropy.
    `flags` - Optional flags.
    `description` - Optional description.
    `prompt` - Prompt structure.
  Returns:
    Protected bytes.

### cryptUnprotectData

    public static byte[] cryptUnprotectData(byte[] data)

  Unprotect a blob of data.

  Parameters:
    `data` - Data to unprotect.
  Returns:
    Unprotected blob of data.

### cryptUnprotectData

    public static byte[] cryptUnprotectData(byte[] data,
                                            int flags)

  Unprotect a blob of data.

  Parameters:
    `data` - Data to unprotect.
    `flags` - Optional flags, eg. CRYPTPROTECT_UI_FORBIDDEN.
  Returns:
    Unprotected blob of data.

### cryptUnprotectData

    public static byte[] cryptUnprotectData(byte[] data,
                                            byte[] entropy,
                                            int flags,
                                            WinCrypt.CRYPTPROTECT_PROMPTSTRUCT prompt)

  Unprotect a blob of data.

  Parameters:
    `data` - Data to unprotect.
    `entropy` - Optional entropy.
    `flags` - Optional flags.
    `prompt` - Optional prompt structure.
  Returns:
    Unprotected blob of data.

Overview | Package | Class | Tree | Deprecated | Index | Help
| JNA API 3.3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007-2010 Timothy Wall. All Rights Reserved.