KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > crypto > spec > PSource


1 /*
2  * @(#)PSource.java 1.4 04/06/03
3  *
4  * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7   
8 /*
9  * NOTE:
10  * Because of various external restrictions (i.e. US export
11  * regulations, etc.), the actual source code can not be provided
12  * at this time. This file represents the skeleton of the source
13  * file, so that javadocs of the API can be created.
14  */

15
16 package javax.crypto.spec;
17
18 import java.math.BigInteger;
19 import java.security.spec.AlgorithmParameterSpec;
20
21 /**
22  * This class specifies the source for encoding input P in OAEP Padding,
23  * as defined in the
24  * <a HREF="http://www.ietf.org/rfc/rfc3447.txt">PKCS #1</a>
25  * standard.
26  * <pre>
27  * PKCS1PSourceAlgorithms ALGORITHM-IDENTIFIER ::= {
28  * { OID id-pSpecified PARAMETERS OCTET STRING },
29  * ... -- Allows for future expansion --
30  * }
31  * </pre>
32  * @author Valerie Peng
33  *
34  * @version 1.4, 06/03/04
35  * @since 1.5
36  */

37 public class PSource
38 {
39
40     /**
41      * Constructs a source of the encoding input P for OAEP
42      * padding as defined in the PKCS #1 standard using the
43      * specified PSource algorithm.
44      * @param pSrcName the algorithm for the source of the
45      * encoding input P.
46      * @exception NullPointerException if <code>pSrcName</code>
47      * is null.
48      */

49     protected PSource(String pSrcName) { }
50
51     /**
52      * Returns the PSource algorithm name.
53      *
54      * @return the PSource algorithm name.
55      */

56     public String getAlgorithm() {
57         return null;
58     }
59
60     /**
61      * This class is used to explicitly specify the value for
62      * encoding input P in OAEP Padding.
63      */

64     public static final class PSpecified extends PSource
65     {
66         /**
67          * The encoding input P whose value equals byte[0].
68          */

69         public static final javax.crypto.spec.PSource.PSpecified DEFAULT = null;
70
71         /**
72          * Constructs the source explicitly with the specified
73          * value <code>p</code> as the encoding input P.
74          * Note:
75          * @param p the value of the encoding input. The contents
76          * of the array are copied to protect against subsequent
77          * modification.
78          * @exception NullPointerException if <code>p</code> is null.
79          */

80         public PSpecified(byte[] p) { }
81
82         /**
83          * Returns the value of encoding input P.
84          * @return the value of encoding input P. A new array is
85          * returned each time this method is called.
86          */

87         public byte[] getValue() {
88             return null;
89         }
90     }
91 }
92
Popular Tags