Browse Source

Fix build

pull/277/head
Tilen Komel 2 years ago
parent
commit
354d04592b
  1. 3
      src/components/PageComponents/Config/Security.tsx
  2. 6
      src/core/utils/x25519.ts

3
src/components/PageComponents/Config/Security.tsx

@ -126,7 +126,8 @@ export const Security = (): JSX.Element => {
publicKey: publicKey, publicKey: publicKey,
adminChannelEnabled: config.security?.adminChannelEnabled ?? false, adminChannelEnabled: config.security?.adminChannelEnabled ?? false,
isManaged: config.security?.isManaged ?? false, isManaged: config.security?.isManaged ?? false,
bluetoothLoggingEnabled: config.security?.bluetoothLoggingEnabled ?? false, bluetoothLoggingEnabled:
config.security?.bluetoothLoggingEnabled ?? false,
debugLogApiEnabled: config.security?.debugLogApiEnabled ?? false, debugLogApiEnabled: config.security?.debugLogApiEnabled ?? false,
serialEnabled: config.security?.serialEnabled ?? false, serialEnabled: config.security?.serialEnabled ?? false,
}, },

6
src/core/utils/x25519.ts

@ -3,9 +3,9 @@ import { x25519 } from "@noble/curves/ed25519";
export function getX25519PrivateKey(): Uint8Array { export function getX25519PrivateKey(): Uint8Array {
const key = x25519.utils.randomPrivateKey(); const key = x25519.utils.randomPrivateKey();
key[0] &= 248 key[0] &= 248;
key[31] &= 127 key[31] &= 127;
key[31] |= 64 key[31] |= 64;
return key; return key;
} }

Loading…
Cancel
Save