jdk/src/share/classes/com/sun/crypto/provider/DESKey.java
changeset 10336 0bb1999251f8
parent 5506 202f599c92aa
equal deleted inserted replaced
10335:3c7eda3ab2f5 10336:0bb1999251f8
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2011, 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
    76     }
    76     }
    77 
    77 
    78     public byte[] getEncoded() {
    78     public byte[] getEncoded() {
    79         // Return a copy of the key, rather than a reference,
    79         // Return a copy of the key, rather than a reference,
    80         // so that the key data cannot be modified from outside
    80         // so that the key data cannot be modified from outside
    81         return (byte[])this.key.clone();
    81         return this.key.clone();
    82     }
    82     }
    83 
    83 
    84     public String getAlgorithm() {
    84     public String getAlgorithm() {
    85         return "DES";
    85         return "DES";
    86     }
    86     }
   124      */
   124      */
   125     private void readObject(java.io.ObjectInputStream s)
   125     private void readObject(java.io.ObjectInputStream s)
   126          throws java.io.IOException, ClassNotFoundException
   126          throws java.io.IOException, ClassNotFoundException
   127     {
   127     {
   128         s.defaultReadObject();
   128         s.defaultReadObject();
   129         key = (byte[])key.clone();
   129         key = key.clone();
   130     }
   130     }
   131 
   131 
   132     /**
   132     /**
   133      * Replace the DES key to be serialized.
   133      * Replace the DES key to be serialized.
   134      *
   134      *