fix: extraction abstract key split

This commit is contained in:
Karol Sójko
2022-07-05 12:38:34 +02:00
parent 03497cbf5b
commit 85ab5b914a
3 changed files with 25 additions and 19 deletions

View File

@@ -2,29 +2,11 @@ import { Uuid } from '@standardnotes/common'
import {
DecryptedPayloadInterface,
EncryptedPayloadInterface,
ItemsKeyInterface,
PayloadInterface,
RootKeyInterface,
} from '@standardnotes/models'
import { AbstractKeySplit } from './AbstractKeySplit'
import { EncryptionTypeSplit } from './EncryptionTypeSplit'
export interface AbstractKeySplit<T = EncryptedPayloadInterface | DecryptedPayloadInterface> {
usesRootKey?: {
items: T[]
key: RootKeyInterface
}
usesItemsKey?: {
items: T[]
key: ItemsKeyInterface
}
usesRootKeyWithKeyLookup?: {
items: T[]
}
usesItemsKeyWithKeyLookup?: {
items: T[]
}
}
export type KeyedEncryptionSplit = AbstractKeySplit<DecryptedPayloadInterface>
export type KeyedDecryptionSplit = AbstractKeySplit<EncryptedPayloadInterface>