public class WinCrypt
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JNA_LIBRARY_NAME |
static NativeLibrary |
JNA_NATIVE_LIB |
static int |
PROV_RSA_FULL |
Constructor and Description |
---|
WinCrypt() |
Modifier and Type | Method and Description |
---|---|
static BOOL |
CryptAcquireContextW(Pointer phProv,
WString pszContainer,
WString pszProvider,
int dwProvType,
int dwFlags)
Acquires the crypt context.
|
static BOOL |
CryptGenRandom(ULONG hProv,
int dwLen,
Pointer pbBuffer)
Generates random data.
|
static BOOL |
CryptReleaseContext(ULONG hProv,
int dwFlags)
Releases the crypt context.
|
static byte[] |
getRandomFromWindows(int numBytes)
Gets random numbers from Windows API.
|
public static final java.lang.String JNA_LIBRARY_NAME
public static final NativeLibrary JNA_NATIVE_LIB
public static final int PROV_RSA_FULL
public static BOOL CryptAcquireContextW(Pointer phProv, WString pszContainer, WString pszProvider, int dwProvType, int dwFlags)
public static BOOL CryptReleaseContext(ULONG hProv, int dwFlags)
public static BOOL CryptGenRandom(ULONG hProv, int dwLen, Pointer pbBuffer)
public static byte[] getRandomFromWindows(int numBytes)
numBytes
- Number of bytes requested.