com.sun.jna.platform.win32

## Class Crypt32Util

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

-     public abstract class Crypt32Util
      extends java.lang.Object

  Crypt32 utility API.
  Author:
    dblock[at]dblock.org

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Crypt32Util()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `cryptProtectData(byte[] data)` Protect a blob of data.
    `static byte[]` | `cryptProtectData(byte[] data, byte[] entropy, int flags, java.lang.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,
                                java.lang.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.

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