move KEK interface to types

This commit is contained in:
Abhinav 2022-01-05 13:05:18 +05:30
parent 344d2b2c0c
commit 2faade0d42
3 changed files with 7 additions and 13 deletions

View file

@ -13,13 +13,7 @@ import SetPasswordForm from 'components/SetPasswordForm';
import { AppContext } from 'pages/_app';
import { SESSION_KEYS } from 'utils/storage/sessionStorage';
import { PAGES } from 'constants/pages';
import { UpdatedKey } from 'types/user';
export interface KEK {
key: string;
opsLimit: number;
memLimit: number;
}
import { KEK, UpdatedKey } from 'types/user';
export default function Generate() {
const [token, setToken] = useState<string>();

View file

@ -19,12 +19,6 @@ import { AppContext } from 'pages/_app';
import { logError } from 'utils/sentry';
import { KeyAttributes, User } from 'types/user';
export interface KEK {
key: string;
opsLimit: number;
memLimit: number;
}
export default function Generate() {
const [token, setToken] = useState<string>();
const router = useRouter();

View file

@ -14,6 +14,12 @@ export interface KeyAttributes {
recoveryKeyEncryptedWithMasterKey: string;
recoveryKeyDecryptionNonce: string;
}
export interface KEK {
key: string;
opsLimit: number;
memLimit: number;
}
export interface UpdatedKey {
kekSalt: string;
encryptedKey: string;