mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-06-25 03:16:28 +02:00
[WIP] Encryption for secure values (#183)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { useCallback, useState } from 'react';
|
||||
import { generateId } from '../lib/generateId';
|
||||
|
||||
export function useRandomKey() {
|
||||
const [value, setValue] = useState<string>(generateId());
|
||||
const regenerate = useCallback(() => setValue(generateId()), []);
|
||||
return [value, regenerate] as const;
|
||||
}
|
||||
Reference in New Issue
Block a user