introduce CachingDataDecryptorFactory towards cached session keys
this commit introduces the CachingDataDecryptorFactory, which wraps a DataDecryptorFactory but supports caching of decrypted session keys. this change also gets rid of runtimeexception based control flow in PgpDecryptVerify.
This commit is contained in:
@@ -97,8 +97,12 @@ public class CryptoInputParcel implements Parcelable {
|
||||
mCryptoData.put(ByteBuffer.wrap(hash), signedHash);
|
||||
}
|
||||
|
||||
public void addCryptoData(Map<ByteBuffer, byte[]> cachedSessionKeys) {
|
||||
mCryptoData.putAll(cachedSessionKeys);
|
||||
}
|
||||
|
||||
public Map<ByteBuffer, byte[]> getCryptoData() {
|
||||
return Collections.unmodifiableMap(mCryptoData);
|
||||
return mCryptoData;
|
||||
}
|
||||
|
||||
public Date getSignatureTime() {
|
||||
@@ -138,4 +142,5 @@ public class CryptoInputParcel implements Parcelable {
|
||||
b.append("}");
|
||||
return b.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user