home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / security / spec / DSAParameterSpec.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.7 KB  |  80 lines

  1. /*
  2.  * @(#)DSAParameterSpec.java    1.7 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.security.spec;
  16.  
  17. import java.math.BigInteger;
  18.  
  19. /**
  20.  * This class specifies the set of parameters used with the DSA algorithm.
  21.  * 
  22.  * @author Jan Luehe
  23.  *
  24.  * @version 1.7, 98/03/18
  25.  *
  26.  * @see AlgorithmParameterSpec
  27.  *
  28.  * @since JDK1.2
  29.  */
  30.  
  31. public class DSAParameterSpec implements AlgorithmParameterSpec,
  32. java.security.interfaces.DSAParams {
  33.  
  34.     BigInteger p;
  35.     BigInteger q;
  36.     BigInteger g;
  37.  
  38.     /**
  39.      * Creates a new DSAParameterSpec with the specified parameter values.
  40.      * 
  41.      * @param p the prime.
  42.      * 
  43.      * @param q the sub-prime.
  44.      * 
  45.      * @param g the base.
  46.      */
  47.     public DSAParameterSpec(BigInteger p, BigInteger q, BigInteger g) {
  48.     this.p = p;
  49.     this.q = q;
  50.     this.g = g;
  51.     }
  52.  
  53.     /**
  54.      * Returns the prime <code>p</code>.
  55.      *
  56.      * @return the prime <code>p</code>.
  57.      */
  58.     public BigInteger getP() {
  59.     return this.p;
  60.     }
  61.  
  62.     /**
  63.      * Returns the sub-prime <code>q</code>.
  64.      *
  65.      * @return the sub-prime <code>q</code>.
  66.      */
  67.     public BigInteger getQ() {
  68.     return this.q;
  69.     }
  70.  
  71.     /**
  72.      * Returns the base <code>g</code>.
  73.      *
  74.      * @return the base <code>g</code>.
  75.      */
  76.     public BigInteger getG() {
  77.     return this.g;
  78.     }    
  79. }
  80.