src/java.base/share/classes/sun/security/provider/SecureRandom.java
changeset 57950 4612a3cfb927
parent 47216 71c04702a3d5
equal deleted inserted replaced
57945:e09c993ac476 57950:4612a3cfb927
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    53  */
    53  */
    54 
    54 
    55 public final class SecureRandom extends SecureRandomSpi
    55 public final class SecureRandom extends SecureRandomSpi
    56 implements java.io.Serializable {
    56 implements java.io.Serializable {
    57 
    57 
       
    58     @java.io.Serial
    58     private static final long serialVersionUID = 3581829991155417889L;
    59     private static final long serialVersionUID = 3581829991155417889L;
    59 
    60 
    60     private static final int DIGEST_SIZE = 20;
    61     private static final int DIGEST_SIZE = 20;
    61     private transient MessageDigest digest;
    62     private transient MessageDigest digest;
    62     private byte[] state;
    63     private byte[] state;
   269      * Note that the engineNextBytes() method invoked on the restored random
   270      * Note that the engineNextBytes() method invoked on the restored random
   270      * object will yield the exact same (random) bytes as the original.
   271      * object will yield the exact same (random) bytes as the original.
   271      * If you do not want this behaviour, you should re-seed the restored
   272      * If you do not want this behaviour, you should re-seed the restored
   272      * random object, using engineSetSeed().
   273      * random object, using engineSetSeed().
   273      */
   274      */
       
   275     @java.io.Serial
   274     private void readObject(java.io.ObjectInputStream s)
   276     private void readObject(java.io.ObjectInputStream s)
   275         throws IOException, ClassNotFoundException {
   277         throws IOException, ClassNotFoundException {
   276 
   278 
   277         s.defaultReadObject ();
   279         s.defaultReadObject ();
   278 
   280