home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 1.6 KB | 67 lines |
- /*
- * @(#)PKCS8EncodedKeySpec.java 1.6 98/03/18
- *
- * Copyright 1997 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package java.security.spec;
-
- /**
- * This class represents the DER encoding of a private key, according to the
- * format specified in the PKCS #8 standard.
- *
- * @author Jan Luehe
- *
- * @version 1.6, 98/03/18
- *
- * @see java.security.Key
- * @see java.security.KeyFactory
- * @see KeySpec
- * @see EncodedKeySpec
- * @see X509EncodedKeySpec
- *
- * @since JDK1.2
- */
-
- public class PKCS8EncodedKeySpec extends EncodedKeySpec {
-
- private byte[] encodedKey;
-
- /**
- * Creates a new PKCS8EncodedKeySpec with the specified encoded key.
- *
- * @param encodedKey the key, which is assumed to be
- * encoded according to the PKCS #8 standard.
- */
- public PKCS8EncodedKeySpec(byte[] encodedKey) {
- this.encodedKey = encodedKey;
- }
-
- /**
- * Returns the key bytes, encoded according to the PKCS #8 standard.
- *
- * @return the PKCS #8 encoding of the key.
- */
- public byte[] getEncoded() {
- return this.encodedKey;
- }
-
- /**
- * Returns the name of the encoding format associated with this
- * key specification.
- *
- * @return the string <code>"PKCS#8"</code>.
- */
- public final String getFormat() {
- return "PKCS#8";
- }
- }
-