Skip navigation links
JNA API 4.2.1
com.sun.jna.platform.win32

Class Crypt32Util



  • public abstract class Crypt32Util
    extends Object
    Crypt32 utility API.
    Author:
    dblock[at]dblock.org
    • 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.
JNA API 4.2.1

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