🐛 fix: Fixing issues with generating standard and quantum-resistant encryption keys
This commit is contained in:
@@ -444,7 +444,16 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
||||
placeholder: (t) => t('encryption_private_key_placeholder'),
|
||||
group: 'encryption',
|
||||
generate: {
|
||||
function: generateMLKEM768KeyPair,
|
||||
functions: [
|
||||
{
|
||||
label: (t) => t('generate_standard_encryption_key'),
|
||||
function: generateRealityKeyPair,
|
||||
},
|
||||
{
|
||||
label: (t) => t('generate_quantum_resistant_key'),
|
||||
function: generateMLKEM768KeyPair,
|
||||
},
|
||||
],
|
||||
updateFields: {
|
||||
encryption_private_key: 'privateKey',
|
||||
encryption_password: 'publicKey',
|
||||
|
||||
@@ -12,7 +12,11 @@ export type FieldConfig = {
|
||||
step?: number;
|
||||
suffix?: string;
|
||||
generate?: {
|
||||
function: () => Promise<string | Record<string, string>> | string | Record<string, string>;
|
||||
function?: () => Promise<string | Record<string, string>> | string | Record<string, string>;
|
||||
functions?: {
|
||||
label: string | ((t: (key: string) => string, protocol: any) => string);
|
||||
function: () => Promise<string | Record<string, string>> | string | Record<string, string>;
|
||||
}[];
|
||||
updateFields?: Record<string, string>;
|
||||
};
|
||||
condition?: (protocol: any, values: any) => boolean;
|
||||
|
||||
Reference in New Issue
Block a user