Module java.base

Class RSAPrivateKeySpec

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

public class RSAPrivateKeySpec extends Object implements KeySpec
该类指定了一个RSA私钥。
自JDK版本:
1.2
参见:
  • Constructor Details

    • RSAPrivateKeySpec

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

      public RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent, AlgorithmParameterSpec params)
      创建一个带有额外密钥参数的新的RSAPrivateKeySpec。
      参数:
      modulus - 模数
      privateExponent - 私有指数
      params - 与此密钥关联的参数,可能为null
      自JDK版本:
      11
  • Method Details

    • getModulus

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

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

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