get rid of direct query for blob from backup operation

This commit is contained in:
Vincent Breitmoser
2017-02-20 21:32:54 +01:00
parent c2b9af077a
commit 623964701b
2 changed files with 31 additions and 21 deletions

View File

@@ -238,6 +238,16 @@ public class DatabaseInteractor {
return mContentResolver;
}
public byte[] getPublicKeyRingData(long masterKeyId) throws NotFoundException {
return (byte[]) getGenericData(KeychainContract.KeyRingData.buildPublicKeyRingUri(masterKeyId),
KeyRingData.KEY_RING_DATA, FIELD_TYPE_BLOB);
}
public byte[] getSecretKeyRingData(long masterKeyId) throws NotFoundException {
return (byte[]) getGenericData(KeychainContract.KeyRingData.buildSecretKeyRingUri(masterKeyId),
KeyRingData.KEY_RING_DATA, FIELD_TYPE_BLOB);
}
public static class NotFoundException extends Exception {
public NotFoundException() {
}