/[classpath]/classpath/java/security/SecureRandom.java
ViewVC logotype

Diff of /classpath/java/security/SecureRandom.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by mark, Fri Dec 13 12:51:47 2002 UTC revision 1.9 by tromey, Thu Feb 13 17:00:50 2003 UTC
# Line 1  Line 1 
1  /* SecureRandom.java --- Secure Random class implmentation  /* SecureRandom.java --- Secure Random class implmentation
2     Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.     Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 36  obligated to do so.  If you do not wish Line 36  obligated to do so.  If you do not wish
36  exception statement from your version. */  exception statement from your version. */
37    
38  package java.security;  package java.security;
39    
40  import java.io.Serializable;  import java.io.Serializable;
41  import java.util.Random;  import java.util.Random;
42  import java.util.Enumeration;  import java.util.Enumeration;
# Line 358  public class SecureRandom extends Random Line 359  public class SecureRandom extends Random
359      int ret = 0;      int ret = 0;
360    
361      for (int i = 0; i < tmp.length; i++)      for (int i = 0; i < tmp.length; i++)
362        ret |= tmp[i] << (8 * i);        ret |= (tmp[i] & 0xFF) << (8 * i);
363    
364      return ret;      long mask = (1L << numBits) - 1;
365        return (int) (ret & mask);
366    }    }
367    
368    /**    /**

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26