Class WindowsEntropyApi


  • public class WindowsEntropyApi
    extends java.lang.Object
    Access to windows cryptographically secure entropy.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int PROV_RSA_FULL
      Default provider to use.
      static java.lang.String WIN_LIB_NAME
      Library name used to access the API
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] getEntropy​(int numbytes)
      Gets random numbers from Windows API.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • WIN_LIB_NAME

        public static final java.lang.String WIN_LIB_NAME
        Library name used to access the API
        See Also:
        Constant Field Values
      • PROV_RSA_FULL

        public static final int PROV_RSA_FULL
        Default provider to use.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WindowsEntropyApi

        public WindowsEntropyApi()
    • Method Detail

      • getEntropy

        public static byte[] getEntropy​(int numbytes)
        Gets random numbers from Windows API.
        Parameters:
        numBytes - Number of bytes requested.
        Returns:
        Random data, null on failure.