From c7eb40b8145fa70b05b1c4cfe01852a95a669e11 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 16 Apr 2014 17:33:33 +0200 Subject: stripped support: implement has_secret support, in ui and impot of secret keys Closes #570 --- .../src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java | 11 ++++++++++- .../src/main/java/org/spongycastle/openpgp/PGPSecretKey.java | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'libraries') diff --git a/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java b/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java index 2554be8f1..1fa5261b1 100644 --- a/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java +++ b/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java @@ -278,7 +278,16 @@ public class PGPSecretKey { return pub.getUserIDs(); } - + + /** + * Return the S2K object used to encrypt this secret key. + * + * @return an iterator of Strings. + */ + public S2K getS2K() { + return secret.getS2K(); + } + /** * Return any user attribute vectors associated with the key. * diff --git a/libraries/spongycastle/pg/src/main/java/org/spongycastle/openpgp/PGPSecretKey.java b/libraries/spongycastle/pg/src/main/java/org/spongycastle/openpgp/PGPSecretKey.java index c0f7dfa3b..f7e3a50c7 100644 --- a/libraries/spongycastle/pg/src/main/java/org/spongycastle/openpgp/PGPSecretKey.java +++ b/libraries/spongycastle/pg/src/main/java/org/spongycastle/openpgp/PGPSecretKey.java @@ -431,7 +431,16 @@ public class PGPSecretKey { return pub.getUserIDs(); } - + + /** + * Return the S2K this secret key is encrypted with. + * + * @return the S2K for this key. + */ + public S2K getS2K() { + return secret.getS2K(); + } + /** * Return any user attribute vectors associated with the key. * -- cgit v1.2.3 From 7e626a122ae2c4debc55039f4056c22d6cd64d0e Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 16 Apr 2014 19:18:15 +0200 Subject: Update PGPSecretKey.java fix --- .../pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libraries') diff --git a/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java b/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java index 1fa5261b1..8552f6fca 100644 --- a/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java +++ b/libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java @@ -282,7 +282,7 @@ public class PGPSecretKey /** * Return the S2K object used to encrypt this secret key. * - * @return an iterator of Strings. + * @return this secret key's s2k object' */ public S2K getS2K() { return secret.getS2K(); -- cgit v1.2.3