Merge remote-tracking branch 'meshtastic-remote/master' into fix/static-ip-display

This commit is contained in:
Hunter Thornsberry
2024-09-15 19:39:13 -04:00
28 changed files with 1357 additions and 168 deletions
+15
View File
@@ -0,0 +1,15 @@
import { x25519 } from "@noble/curves/ed25519";
export function getX25519PrivateKey(): Uint8Array {
const key = x25519.utils.randomPrivateKey();
key[0] &= 248;
key[31] &= 127;
key[31] |= 64;
return key;
}
export function getX25519PublicKey(privateKey: Uint8Array): Uint8Array {
return x25519.getPublicKey(privateKey);
}