equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 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 |
41 * |
41 * |
42 */ |
42 */ |
43 |
43 |
44 final class DESedeKey implements SecretKey { |
44 final class DESedeKey implements SecretKey { |
45 |
45 |
|
46 @java.io.Serial |
46 static final long serialVersionUID = 2463986565756745178L; |
47 static final long serialVersionUID = 2463986565756745178L; |
47 |
48 |
48 private byte[] key; |
49 private byte[] key; |
49 |
50 |
50 /** |
51 /** |
134 |
135 |
135 /** |
136 /** |
136 * readObject is called to restore the state of this key from |
137 * readObject is called to restore the state of this key from |
137 * a stream. |
138 * a stream. |
138 */ |
139 */ |
|
140 @java.io.Serial |
139 private void readObject(java.io.ObjectInputStream s) |
141 private void readObject(java.io.ObjectInputStream s) |
140 throws java.io.IOException, ClassNotFoundException |
142 throws java.io.IOException, ClassNotFoundException |
141 { |
143 { |
142 s.defaultReadObject(); |
144 s.defaultReadObject(); |
143 key = key.clone(); |
145 key = key.clone(); |
149 * @return the standard KeyRep object to be serialized |
151 * @return the standard KeyRep object to be serialized |
150 * |
152 * |
151 * @throws java.io.ObjectStreamException if a new object representing |
153 * @throws java.io.ObjectStreamException if a new object representing |
152 * this DESede key could not be created |
154 * this DESede key could not be created |
153 */ |
155 */ |
|
156 @java.io.Serial |
154 private Object writeReplace() throws java.io.ObjectStreamException { |
157 private Object writeReplace() throws java.io.ObjectStreamException { |
155 return new KeyRep(KeyRep.Type.SECRET, |
158 return new KeyRep(KeyRep.Type.SECRET, |
156 getAlgorithm(), |
159 getAlgorithm(), |
157 getFormat(), |
160 getFormat(), |
158 getEncoded()); |
161 getEncoded()); |