fix: encryption exports (#1205)
* fix: encryptio exports * fix: imports * fix: items key mutator import
This commit is contained in:
@@ -7,17 +7,3 @@ export type BackupFile = {
|
||||
auth_params?: AnyKeyParamsContent
|
||||
items: (BackupFileDecryptedContextualPayload | BackupFileEncryptedContextualPayload)[]
|
||||
}
|
||||
|
||||
export enum BackupFileType {
|
||||
Encrypted = 'Encrypted',
|
||||
|
||||
/**
|
||||
* Generated when an export is made from an application with no account and no passcode. The
|
||||
* items are encrypted, but the items keys are not.
|
||||
*/
|
||||
EncryptedWithNonEncryptedItemsKey = 'EncryptedWithNonEncryptedItemsKey',
|
||||
|
||||
FullyDecrypted = 'FullyDecrypted',
|
||||
|
||||
Corrupt = 'Corrupt',
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ import {
|
||||
leftVersionGreaterThanOrEqualToRight,
|
||||
compareVersions,
|
||||
} from '@standardnotes/common'
|
||||
import { BackupFile, BackupFileType } from './BackupFile'
|
||||
import { BackupFile } from './BackupFile'
|
||||
import { BackupFileType } from './BackupFileType'
|
||||
import { extendArray } from '@standardnotes/utils'
|
||||
import { EncryptionService } from '../Service/Encryption/EncryptionService'
|
||||
import {
|
||||
@@ -28,7 +29,7 @@ import { CreateAnyKeyParams } from '../Keys/RootKey/KeyParamsFunctions'
|
||||
import { SNRootKeyParams } from '../Keys/RootKey/RootKeyParams'
|
||||
import { SNRootKey } from '../Keys/RootKey/RootKey'
|
||||
import { ContentTypeUsesRootKeyEncryption } from '../Keys/RootKey/Functions'
|
||||
import { isItemsKey, SNItemsKey } from '../Keys/ItemsKey'
|
||||
import { isItemsKey, SNItemsKey } from '../Keys/ItemsKey/ItemsKey'
|
||||
|
||||
export async function DecryptBackupFile(
|
||||
file: BackupFile,
|
||||
|
||||
13
packages/encryption/src/Domain/Backups/BackupFileType.ts
Normal file
13
packages/encryption/src/Domain/Backups/BackupFileType.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export enum BackupFileType {
|
||||
Encrypted = 'Encrypted',
|
||||
|
||||
/**
|
||||
* Generated when an export is made from an application with no account and no passcode. The
|
||||
* items are encrypted, but the items keys are not.
|
||||
*/
|
||||
EncryptedWithNonEncryptedItemsKey = 'EncryptedWithNonEncryptedItemsKey',
|
||||
|
||||
FullyDecrypted = 'FullyDecrypted',
|
||||
|
||||
Corrupt = 'Corrupt',
|
||||
}
|
||||
Reference in New Issue
Block a user