diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-05-03 15:55:10 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-05-03 15:55:28 +0200 |
commit | 4b3cfd4fa41ef8339a0691b38c4c6ec481b5c3df (patch) | |
tree | 4ee6791ed0cd82c08020a6c1a56b9ab736c62543 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CachedKeyRing.java | |
parent | 4053e1ebd795f5b5fba8ed61185e5a5fdf9b0820 (diff) | |
download | open-keychain-4b3cfd4fa41ef8339a0691b38c4c6ec481b5c3df.tar.gz open-keychain-4b3cfd4fa41ef8339a0691b38c4c6ec481b5c3df.tar.bz2 open-keychain-4b3cfd4fa41ef8339a0691b38c4c6ec481b5c3df.zip |
wrapped-key-ring: first steps, get rid of key imports in decryptverify and signencrypt
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CachedKeyRing.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CachedKeyRing.java | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CachedKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CachedKeyRing.java new file mode 100644 index 000000000..5cf89b6a6 --- /dev/null +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CachedKeyRing.java @@ -0,0 +1,61 @@ +package org.sufficientlysecure.keychain.pgp; + +import org.spongycastle.openpgp.PGPSignature; + +public abstract class CachedKeyRing { + + private final long mMasterKeyId; + private final int mKeySize; + private final boolean mIsRevoked; + private final boolean mCanCertify; + private final long mCreation; + private final long mExpiry; + private final int mAlgorithm; + private final byte[] mFingerprint; + private final String mUserId; + private final int mVerified; + private final boolean mHasSecret; + + protected CachedKeyRing(long masterKeyId, int keySize, boolean isRevoked, + boolean canCertify, long creation, long expiry, int algorithm, + byte[] fingerprint, String userId, int verified, boolean hasSecret) + { + mMasterKeyId = masterKeyId; + mKeySize = keySize; + mIsRevoked = isRevoked; + mCanCertify = canCertify; + mCreation = creation; + mExpiry = expiry; + mAlgorithm = algorithm; + mFingerprint = fingerprint; + mUserId = userId; + mVerified = verified; + mHasSecret = hasSecret; + } + + public boolean isRevoked() { + return mIsRevoked; + } + + public byte[] getFingerprint() { + + return mFingerprint; + } + + public String getPrimaryUserId() { + return mUserId; + } + + public long getMasterKeyId() { + return mMasterKeyId; + } + + public int getVerified() { + return mVerified; + } + + public void initSignature(PGPSignature sig) { + + } + +} |