chore(encryption): lint
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { ContentType, ProtocolVersion } from '@standardnotes/common'
|
||||
import {
|
||||
ConflictStrategy,
|
||||
ItemsKeyContent,
|
||||
DecryptedItem,
|
||||
DecryptedPayloadInterface,
|
||||
DecryptedItemInterface,
|
||||
DecryptedPayloadInterface,
|
||||
HistoryEntryInterface,
|
||||
ItemsKeyContent,
|
||||
ItemsKeyInterface,
|
||||
RootKeyInterface,
|
||||
} from '@standardnotes/models'
|
||||
import { ContentType, ProtocolVersion } from '@standardnotes/common'
|
||||
|
||||
export function isItemsKey(x: ItemsKeyInterface | RootKeyInterface): x is ItemsKeyInterface {
|
||||
return x.content_type === ContentType.ItemsKey
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DecryptedItemMutator, ItemsKeyMutatorInterface, ItemsKeyContent } from '@standardnotes/models'
|
||||
import { DecryptedItemMutator, ItemsKeyContent, ItemsKeyMutatorInterface } from '@standardnotes/models'
|
||||
|
||||
export class ItemsKeyMutator extends DecryptedItemMutator<ItemsKeyContent> implements ItemsKeyMutatorInterface {
|
||||
set isDefault(isDefault: boolean) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ContentType } from '@standardnotes/common'
|
||||
import { RegisterItemClass, DecryptedItemMutator, ItemsKeyContent } from '@standardnotes/models'
|
||||
import { DecryptedItemMutator, ItemsKeyContent, RegisterItemClass } from '@standardnotes/models'
|
||||
import { SNItemsKey } from './ItemsKey'
|
||||
import { ItemsKeyMutator } from './ItemsKeyMutator'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SNRootKey } from './RootKey'
|
||||
import { ContentType, ProtocolVersion } from '@standardnotes/common'
|
||||
import {
|
||||
DecryptedPayload,
|
||||
FillItemContentSpecialized,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
RootKeyContentSpecialized,
|
||||
} from '@standardnotes/models'
|
||||
import { UuidGenerator } from '@standardnotes/utils'
|
||||
import { ContentType, ProtocolVersion } from '@standardnotes/common'
|
||||
import { SNRootKey } from './RootKey'
|
||||
|
||||
export function CreateNewRootKey(content: RootKeyContentSpecialized): SNRootKey {
|
||||
const uuid = UuidGenerator.GenerateUuid()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { KeyParamsResponse } from '@standardnotes/responses'
|
||||
import {
|
||||
AnyKeyParamsContent,
|
||||
KeyParamsContent001,
|
||||
KeyParamsContent002,
|
||||
KeyParamsContent003,
|
||||
KeyParamsContent004,
|
||||
AnyKeyParamsContent,
|
||||
} from '@standardnotes/common'
|
||||
import { SNRootKeyParams } from './RootKeyParams'
|
||||
import { KeyParamsResponse } from '@standardnotes/responses'
|
||||
import { ProtocolVersionForKeyParams } from './ProtocolVersionForKeyParams'
|
||||
import { SNRootKeyParams } from './RootKeyParams'
|
||||
|
||||
/**
|
||||
* 001, 002:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { V001Algorithm, V002Algorithm } from '../../Algorithm'
|
||||
import { KeyParamsData } from '@standardnotes/responses'
|
||||
import { AnyKeyParamsContent, ProtocolVersion } from '@standardnotes/common'
|
||||
import { KeyParamsData } from '@standardnotes/responses'
|
||||
import { V001Algorithm, V002Algorithm } from '../../Algorithm'
|
||||
|
||||
export function ProtocolVersionForKeyParams(response: KeyParamsData | AnyKeyParamsContent): ProtocolVersion {
|
||||
if (response.version) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { SNRootKeyParams } from './RootKeyParams'
|
||||
import { ProtocolVersion } from '@standardnotes/common'
|
||||
import {
|
||||
RootKeyInterface,
|
||||
RootKeyContent,
|
||||
DecryptedItem,
|
||||
DecryptedPayloadInterface,
|
||||
RootKeyContentInStorage,
|
||||
NamespacedRootKeyInKeychain,
|
||||
RootKeyContent,
|
||||
RootKeyContentInStorage,
|
||||
RootKeyInterface,
|
||||
} from '@standardnotes/models'
|
||||
import { ProtocolVersion } from '@standardnotes/common'
|
||||
import { timingSafeEqual } from '@standardnotes/sncrypto-common'
|
||||
import { SNRootKeyParams } from './RootKeyParams'
|
||||
|
||||
/**
|
||||
* A root key is a local only construct that houses the key used for the encryption
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import {
|
||||
AnyKeyParamsContent,
|
||||
KeyParamsContent001,
|
||||
KeyParamsContent002,
|
||||
KeyParamsContent003,
|
||||
KeyParamsContent004,
|
||||
AnyKeyParamsContent,
|
||||
ProtocolVersion,
|
||||
KeyParamsOrigination,
|
||||
ProtocolVersion,
|
||||
} from '@standardnotes/common'
|
||||
import { RootKeyParamsInterface } from '@standardnotes/models'
|
||||
import { pickByCopy } from '@standardnotes/utils'
|
||||
|
||||
Reference in New Issue
Block a user