< prev index next >
src/java.base/share/classes/java/security/interfaces/RSAKey.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -24,13 +24,16 @@
*/
package java.security.interfaces;
import java.math.BigInteger;
+import java.security.spec.AlgorithmParameterSpec;
/**
- * The interface to an RSA public or private key.
+ * The interface to a public or private key in
+ * <a href="https://tools.ietf.org/rfc/rfc8017.txt">PKCS#1 v2.2</a> standard,
+ * such as those for RSA, or RSASSA-PSS algorithms.
*
* @author Jan Luehe
*
* @see RSAPublicKey
* @see RSAPrivateKey
@@ -44,6 +47,22 @@
* Returns the modulus.
*
* @return the modulus
*/
public BigInteger getModulus();
+
+ /**
+ * Returns the parameters associated with this key.
+ * The parameters are optional and may be either
+ * explicitly specified or implicitly created during
+ * key pair generation.
+ *
+ * @implSpec
+ * The default implementation returns {@code null}.
+ *
+ * @return the associated parameters, may be null
+ * @since 11
+ */
+ default AlgorithmParameterSpec getParams() {
+ return null;
+ }
}
< prev index next >