Class LinuxSecureRandom

  • All Implemented Interfaces:

    public class LinuxSecureRandom
    A SecureRandom implementation that is able to override the standard JVM provided implementation, and which simply serves random numbers by reading /dev/urandom. That is, it delegates to the kernel on UNIX systems and is unusable on other platforms. Attempts to manually set the seed are ignored. There is no difference between seed bytes and non-seed bytes, they are all from the same source.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected byte[] engineGenerateSeed​(int i)  
      protected void engineNextBytes​(byte[] bytes)  
      protected void engineSetSeed​(byte[] bytes)  
      • Methods inherited from class

        engineGetParameters, engineNextBytes, engineReseed, toString
      • Methods inherited from class java.lang.Object

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

      • LinuxSecureRandom

        public LinuxSecureRandom()
    • Method Detail

      • engineSetSeed

        protected void engineSetSeed​(byte[] bytes)
        Specified by:
        engineSetSeed in class
      • engineNextBytes

        protected void engineNextBytes​(byte[] bytes)
        Specified by:
        engineNextBytes in class
      • engineGenerateSeed

        protected byte[] engineGenerateSeed​(int i)
        Specified by:
        engineGenerateSeed in class