function updateUserPassword
updateUserPassword(
userId: number,
oldPasswordHash: string,
oldWrappedDataKey: string,
newPassword: string,
): Promise<boolean>

Update a user's password and re-wrap DATA_KEY with new KEK Requires the user's old password hash (decrypted) and their user row

Parameters

userId: number
oldPasswordHash: string
oldWrappedDataKey: string
newPassword: string

Return Type

Promise<boolean>

Usage

import { updateUserPassword } from "docs/database.ts";