(password: Uint8Array)
| 43 | export type PasswordValues = ReturnType<typeof derivePasswordValues>; |
| 44 | |
| 45 | export function computePasswordHash(password: Uint8Array) { |
| 46 | mainLogger.info('Started hashing password'); |
| 47 | |
| 48 | const result = sodium.crypto_pwhash_str(password, 2, 32 * 1048576); |
| 49 | |
| 50 | mainLogger.info('Finished hashing password'); |
| 51 | |
| 52 | return result; |
| 53 | } |
| 54 | |
| 55 | export function getDeviceHash(input: { |
| 56 | ip: string; |
no outgoing calls
no test coverage detected