模块 java.base

类 RSAPrivateKeySpec

java.lang.Object
java.security.spec.RSAPrivateKeySpec
所有已实现的接口:
KeySpec
已知子类:
RSAMultiPrimePrivateCrtKeySpec , RSAPrivateCrtKeySpec

public class RSAPrivateKeySpec extends Object implements KeySpec
此类指定 RSA 私钥。
自从:
1.2
参见:
  • 构造方法详细信息

    • RSAPrivateKeySpec

      public RSAPrivateKeySpec(BigInteger  modulus, BigInteger  privateExponent)
      创建一个新的 RSAPrivateKeySpec。
      参数:
      modulus - 模数
      privateExponent - 私有指数
    • RSAPrivateKeySpec

      public RSAPrivateKeySpec(BigInteger  modulus, BigInteger  privateExponent, AlgorithmParameterSpec  params)
      使用附加密钥参数创建新的 RSAPrivateKeySpec。
      参数:
      modulus - 模数
      privateExponent - 私有指数
      params - 与此键关联的参数,可能为空
      自从:
      11
  • 方法详情

    • getModulus

      public BigInteger  getModulus()
      返回模数。
      返回:
      模数
    • getPrivateExponent

      public BigInteger  getPrivateExponent()
      返回私有指数。
      返回:
      私有指数
    • getParams

      public AlgorithmParameterSpec  getParams()
      返回与此键关联的参数,如果不存在则可能为 null。
      返回:
      与此键关联的参数
      自从:
      11