author | psandoz |
Mon, 16 Jun 2014 17:45:26 +0100 | |
changeset 24969 | afa6934dd8e8 |
parent 2 | 90ce3da70b43 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
5 |
/* Copyright (c) 2002 Graz University of Technology. All rights reserved. |
|
6 |
* |
|
7 |
* Redistribution and use in source and binary forms, with or without |
|
8 |
* modification, are permitted provided that the following conditions are met: |
|
9 |
* |
|
10 |
* 1. Redistributions of source code must retain the above copyright notice, |
|
11 |
* this list of conditions and the following disclaimer. |
|
12 |
* |
|
13 |
* 2. Redistributions in binary form must reproduce the above copyright notice, |
|
14 |
* this list of conditions and the following disclaimer in the documentation |
|
15 |
* and/or other materials provided with the distribution. |
|
16 |
* |
|
17 |
* 3. The end-user documentation included with the redistribution, if any, must |
|
18 |
* include the following acknowledgment: |
|
19 |
* |
|
20 |
* "This product includes software developed by IAIK of Graz University of |
|
21 |
* Technology." |
|
22 |
* |
|
23 |
* Alternately, this acknowledgment may appear in the software itself, if |
|
24 |
* and wherever such third-party acknowledgments normally appear. |
|
25 |
* |
|
26 |
* 4. The names "Graz University of Technology" and "IAIK of Graz University of |
|
27 |
* Technology" must not be used to endorse or promote products derived from |
|
28 |
* this software without prior written permission. |
|
29 |
* |
|
30 |
* 5. Products derived from this software may not be called |
|
31 |
* "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior |
|
32 |
* written permission of Graz University of Technology. |
|
33 |
* |
|
34 |
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED |
|
35 |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
36 |
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
37 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE |
|
38 |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, |
|
39 |
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
40 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
|
41 |
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
|
42 |
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
43 |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
|
44 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
45 |
* POSSIBILITY OF SUCH DAMAGE. |
|
46 |
*/ |
|
47 |
||
48 |
package sun.security.pkcs11.wrapper; |
|
49 |
||
50 |
||
51 |
||
52 |
/** |
|
53 |
* class CK_RSA_PKCS_PSS_PARAMS provides the parameters to the CKM_RSA_PKCS_OAEP |
|
54 |
* mechanism.<p> |
|
55 |
* <B>PKCS#11 structure:</B> |
|
56 |
* <PRE> |
|
57 |
* typedef struct CK_RSA_PKCS_PSS_PARAMS { |
|
58 |
* CK_MECHANISM_TYPE hashAlg; |
|
59 |
* CK_RSA_PKCS_MGF_TYPE mgf; |
|
60 |
* CK_ULONG sLen; |
|
61 |
* } CK_RSA_PKCS_PSS_PARAMS; |
|
62 |
* </PRE> |
|
63 |
* |
|
64 |
* @author Karl Scheibelhofer <Karl.Scheibelhofer@iaik.at> |
|
65 |
*/ |
|
66 |
public class CK_RSA_PKCS_PSS_PARAMS { |
|
67 |
||
68 |
/** |
|
69 |
* <B>PKCS#11:</B> |
|
70 |
* <PRE> |
|
71 |
* CK_MECHANISM_TYPE hashAlg; |
|
72 |
* </PRE> |
|
73 |
*/ |
|
74 |
public long hashAlg; |
|
75 |
||
76 |
/** |
|
77 |
* <B>PKCS#11:</B> |
|
78 |
* <PRE> |
|
79 |
* CK_RSA_PKCS_MGF_TYPE mgf; |
|
80 |
* </PRE> |
|
81 |
*/ |
|
82 |
public long mgf; |
|
83 |
||
84 |
/** |
|
85 |
* <B>PKCS#11:</B> |
|
86 |
* <PRE> |
|
87 |
* CK_ULONG sLen; |
|
88 |
* </PRE> |
|
89 |
*/ |
|
90 |
public long sLen; |
|
91 |
||
92 |
/** |
|
93 |
* Returns the string representation of CK_PKCS5_PBKD2_PARAMS. |
|
94 |
* |
|
95 |
* @return the string representation of CK_PKCS5_PBKD2_PARAMS |
|
96 |
*/ |
|
97 |
public String toString() { |
|
24969
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
98 |
StringBuilder sb = new StringBuilder(); |
2 | 99 |
|
24969
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
100 |
sb.append(Constants.INDENT); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
101 |
sb.append("hashAlg: 0x"); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
102 |
sb.append(Functions.toFullHexString(hashAlg)); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
103 |
sb.append(Constants.NEWLINE); |
2 | 104 |
|
24969
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
105 |
sb.append(Constants.INDENT); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
106 |
sb.append("mgf: 0x"); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
107 |
sb.append(Functions.toFullHexString(mgf)); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
108 |
sb.append(Constants.NEWLINE); |
2 | 109 |
|
24969
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
110 |
sb.append(Constants.INDENT); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
111 |
sb.append("sLen: "); |
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
112 |
sb.append(sLen); |
2 | 113 |
//buffer.append(Constants.NEWLINE); |
114 |
||
24969
afa6934dd8e8
8041679: Replace uses of StringBuffer with StringBuilder within core library classes
psandoz
parents:
2
diff
changeset
|
115 |
return sb.toString(); |
2 | 116 |
} |
117 |
||
118 |
} |