diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-16 17:33:33 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-04-16 18:14:44 +0200 |
commit | c7eb40b8145fa70b05b1c4cfe01852a95a669e11 (patch) | |
tree | b04ce3888919b58190126ae86a83dc7b4dcc7131 /libraries/spongycastle | |
parent | 66b8b86695bdeeec1d44289e30294825a0223a82 (diff) | |
download | open-keychain-c7eb40b8145fa70b05b1c4cfe01852a95a669e11.tar.gz open-keychain-c7eb40b8145fa70b05b1c4cfe01852a95a669e11.tar.bz2 open-keychain-c7eb40b8145fa70b05b1c4cfe01852a95a669e11.zip |
stripped support: implement has_secret support, in ui and impot of secret keys
Closes #570
Diffstat (limited to 'libraries/spongycastle')
-rw-r--r-- | libraries/spongycastle/pg/src/main/j2me/org/spongycastle/openpgp/PGPSecretKey.java | 11 | ||||
-rw-r--r-- | libraries/spongycastle/pg/src/main/java/org/spongycastle/openpgp/PGPSecretKey.java | 11 |
2 files changed, 20 insertions, 2 deletions
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. * |