summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/javax/crypto/KeyAgreement.java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java/javax/crypto/KeyAgreement.java')
-rw-r--r--luni/src/main/java/javax/crypto/KeyAgreement.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/luni/src/main/java/javax/crypto/KeyAgreement.java b/luni/src/main/java/javax/crypto/KeyAgreement.java
index d27aa2e..c804273 100644
--- a/luni/src/main/java/javax/crypto/KeyAgreement.java
+++ b/luni/src/main/java/javax/crypto/KeyAgreement.java
@@ -260,6 +260,18 @@ public class KeyAgreement {
}
/**
+ * Returns the {@code KeyAgreementSpi} backing this {@code KeyAgreement} or {@code null} if no
+ * {@code KeyAgreementSpi} is backing this {@code KeyAgreement}.
+ *
+ * @hide
+ */
+ public KeyAgreementSpi getCurrentSpi() {
+ synchronized (initLock) {
+ return spiImpl;
+ }
+ }
+
+ /**
* Initializes this {@code KeyAgreement} with the specified key.
*
* @param key the key to initialize this key agreement.