Class SecureRandomProvider

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.slf4j.Logger logger  
      private java.security.SecureRandom random  
      private byte[] tmp  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void fill​(byte[] bytes)
      Fill the array of bytes with random values.
      void fill​(byte[] bytes, int start, int len)
      Fill part of bytes with random values.
      private static java.security.SecureRandom newRandom()  
      private static java.security.SecureRandom newRandom​(java.lang.String algorithm, java.lang.String provider)  
      • Methods inherited from class java.lang.Object

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

      • logger

        private static final org.slf4j.Logger logger
      • tmp

        private byte[] tmp
      • random

        private java.security.SecureRandom random
    • Constructor Detail

      • SecureRandomProvider

        protected SecureRandomProvider()
      • SecureRandomProvider

        protected SecureRandomProvider​(java.lang.String algorithm,
                                       java.lang.String provider)
    • Method Detail

      • newRandom

        private static java.security.SecureRandom newRandom()
      • newRandom

        private static java.security.SecureRandom newRandom​(java.lang.String algorithm,
                                                            java.lang.String provider)
      • fill

        public void fill​(byte[] bytes,
                         int start,
                         int len)
        Description copied from interface: Random
        Fill part of bytes with random values.
        Specified by:
        fill in interface Random
        Parameters:
        bytes - byte array to be filled.
        start - index to start filling at.
        len - length of segment to fill.
      • fill

        public void fill​(byte[] bytes)
        Description copied from interface: Random
        Fill the array of bytes with random values.
        Specified by:
        fill in interface Random
        Parameters:
        bytes - byte array to be filled.