equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, 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 |
46 * @see javax.crypto.KeyAgreement |
46 * @see javax.crypto.KeyAgreement |
47 */ |
47 */ |
48 final class DHPublicKey implements PublicKey, |
48 final class DHPublicKey implements PublicKey, |
49 javax.crypto.interfaces.DHPublicKey, Serializable { |
49 javax.crypto.interfaces.DHPublicKey, Serializable { |
50 |
50 |
|
51 @java.io.Serial |
51 static final long serialVersionUID = 7647557958927458271L; |
52 static final long serialVersionUID = 7647557958927458271L; |
52 |
53 |
53 // the public key |
54 // the public key |
54 private BigInteger y; |
55 private BigInteger y; |
55 |
56 |
312 * @return the standard KeyRep object to be serialized |
313 * @return the standard KeyRep object to be serialized |
313 * |
314 * |
314 * @throws java.io.ObjectStreamException if a new object representing |
315 * @throws java.io.ObjectStreamException if a new object representing |
315 * this DH public key could not be created |
316 * this DH public key could not be created |
316 */ |
317 */ |
|
318 @java.io.Serial |
317 private Object writeReplace() throws java.io.ObjectStreamException { |
319 private Object writeReplace() throws java.io.ObjectStreamException { |
318 return new KeyRep(KeyRep.Type.PUBLIC, |
320 return new KeyRep(KeyRep.Type.PUBLIC, |
319 getAlgorithm(), |
321 getAlgorithm(), |
320 getFormat(), |
322 getFormat(), |
321 getEncoded()); |
323 getEncoded()); |