001: /*
002: * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
003: */
004:
005: /* Copyright (c) 2002 Graz University of Technology. All rights reserved.
006: *
007: * Redistribution and use in source and binary forms, with or without
008: * modification, are permitted provided that the following conditions are met:
009: *
010: * 1. Redistributions of source code must retain the above copyright notice,
011: * this list of conditions and the following disclaimer.
012: *
013: * 2. Redistributions in binary form must reproduce the above copyright notice,
014: * this list of conditions and the following disclaimer in the documentation
015: * and/or other materials provided with the distribution.
016: *
017: * 3. The end-user documentation included with the redistribution, if any, must
018: * include the following acknowledgment:
019: *
020: * "This product includes software developed by IAIK of Graz University of
021: * Technology."
022: *
023: * Alternately, this acknowledgment may appear in the software itself, if
024: * and wherever such third-party acknowledgments normally appear.
025: *
026: * 4. The names "Graz University of Technology" and "IAIK of Graz University of
027: * Technology" must not be used to endorse or promote products derived from
028: * this software without prior written permission.
029: *
030: * 5. Products derived from this software may not be called
031: * "IAIK PKCS Wrapper", nor may "IAIK" appear in their name, without prior
032: * written permission of Graz University of Technology.
033: *
034: * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
035: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
036: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
037: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE
038: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
039: * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
040: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
041: * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
042: * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
043: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
044: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
045: * POSSIBILITY OF SUCH DAMAGE.
046: */
047:
048: package sun.security.pkcs11.wrapper;
049:
050: /**
051: * class CK_SSL3_MASTER_KEY_DERIVE_PARAMS provides the parameters to the
052: * CKM_SSL3_MASTER_KEY_DERIVE mechanism.<p>
053: * <B>PKCS#11 structure:</B>
054: * <PRE>
055: * typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS {
056: * CK_SSL3_RANDOM_DATA RandomInfo;
057: * CK_VERSION_PTR pVersion;
058: * } CK_SSL3_MASTER_KEY_DERIVE_PARAMS;
059: * </PRE>
060: *
061: * @author Karl Scheibelhofer <Karl.Scheibelhofer@iaik.at>
062: * @author Martin Schlaeffer <schlaeff@sbox.tugraz.at>
063: */
064: public class CK_SSL3_MASTER_KEY_DERIVE_PARAMS {
065:
066: /**
067: * <B>PKCS#11:</B>
068: * <PRE>
069: * CK_SSL3_RANDOM_DATA RandomInfo;
070: * </PRE>
071: */
072: public CK_SSL3_RANDOM_DATA RandomInfo;
073:
074: /**
075: * <B>PKCS#11:</B>
076: * <PRE>
077: * CK_VERSION_PTR pVersion;
078: * </PRE>
079: */
080: public CK_VERSION pVersion;
081:
082: public CK_SSL3_MASTER_KEY_DERIVE_PARAMS(CK_SSL3_RANDOM_DATA random,
083: CK_VERSION version) {
084: RandomInfo = random;
085: pVersion = version;
086: }
087:
088: /**
089: * Returns the string representation of CK_SSL3_MASTER_KEY_DERIVE_PARAMS.
090: *
091: * @return the string representation of CK_SSL3_MASTER_KEY_DERIVE_PARAMS
092: */
093: public String toString() {
094: StringBuilder buffer = new StringBuilder();
095:
096: buffer.append(Constants.INDENT);
097: buffer.append("RandomInfo: ");
098: buffer.append(RandomInfo);
099: buffer.append(Constants.NEWLINE);
100:
101: buffer.append(Constants.INDENT);
102: buffer.append("pVersion: ");
103: buffer.append(pVersion);
104: //buffer.append(Constants.NEWLINE);
105:
106: return buffer.toString();
107: }
108:
109: }
|