Class NativeSecureRandomSpi


  • public class NativeSecureRandomSpi
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void nativeClose​(int nativeId)
      Closes the native resource
      static void nativeGenerateSeed​(int id, byte[] bytes, int numBytes)  
      static int nativeGetCloseId()
      Gets the id of the native close function.
      static int nativeInit()  
      static void nativeNextBytes​(int id, byte[] bytes, int numBytes)  
      static void nativeSetSeed​(int id, byte[] seed, int seedLength)  
      • Methods inherited from class java.lang.Object

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

      • NativeSecureRandomSpi

        public NativeSecureRandomSpi()
    • Method Detail

      • nativeInit

        public static int nativeInit()
                              throws ej.sni.NativeException,
                                     java.security.NoSuchAlgorithmException
        Throws:
        ej.sni.NativeException
        java.security.NoSuchAlgorithmException
      • nativeSetSeed

        public static void nativeSetSeed​(int id,
                                         byte[] seed,
                                         int seedLength)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • nativeNextBytes

        public static void nativeNextBytes​(int id,
                                           byte[] bytes,
                                           int numBytes)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • nativeGenerateSeed

        public static void nativeGenerateSeed​(int id,
                                              byte[] bytes,
                                              int numBytes)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • nativeClose

        public static void nativeClose​(int nativeId)
                                throws ej.sni.NativeException
        Closes the native resource
        Parameters:
        nativeId - the resource id
        Throws:
        ej.sni.NativeException
      • nativeGetCloseId

        public static int nativeGetCloseId()
                                    throws ej.sni.NativeException
        Gets the id of the native close function.
        Returns:
        the id of the static native close function
        Throws:
        ej.sni.NativeException