Discover Packages 
           
        
          
            github.com/tinygo-org/tinygo 
           
        
          
            src 
           
        
          
            crypto 
           
        
        
          
            rand
           
          
            
               
          
        
       
     
   
  
    
  
    
       
    
    
      package 
    
    
      
        
           
      
    
   
    
      
  
    
      
  
    
      Version:  
        v0.33.0
     
    
      Opens a new window with list of versions in this module.
    
    
    
   
      
  
    Published: Aug 20, 2024
   
      
  
    License: BSD-3-Clause 
      
    
   
  
    Opens a new window with license information.
  
      
        
  
    
      Imports:  4
     
   
  
    Opens a new window with list of imports.
  
        
  
    
       Imported by:  0
     
   
  
    Opens a new window with list of known importers.
  
      
    
   
  
  
    
   
 
    
      
    
    
  
  
    
      
        
          Documentation 
        
       
     
  
 
    
  
    
      
      
        
          
  
    
      ¶ 
     
    
  
    
      
        
          Rendered for 
          
            
              linux/amd64 
            
              windows/amd64 
            
              darwin/amd64 
            
              js/wasm 
            
           
         
       
    
  
    
      
        
 
    
Package rand implements a cryptographically secure
random number generator.
 
  
  
  
    
  Reader is a global, shared instance of a cryptographically
secure random number generator.
 
  
  
	  
  
  
    
    
    
  Int returns a uniform random value in [0, max). It panics if max <= 0.
  
         
	  
  
  
    
    
    
  Prime returns a number, p, of the given size, such that p is prime
with high probability.
Prime will return error for any error returned by rand.Read or if bits < 2.
  
         
	  
  
  
    
    
    
  Read is a helper function that calls Reader.Read using io.ReadFull.
On return, n == len(b) if and only if err == nil.
  
           
      
     
   
        
      
      
        
  
    
      ¶ 
     
   
      
      
     
   
   Click to show internal directories. 
   Click to hide internal directories.