import * as crypto from "node:crypto";
import * as WireguardKey from "../WireguardKey.js";
/** @internal */
export const generateKeyPair = () => {
  const keys = crypto.generateKeyPairSync("x25519", {
    publicKeyEncoding: {
      format: "der",
      type: "spki"
    },
    privateKeyEncoding: {
      format: "der",
      type: "pkcs8"
    }
  });
  return {
    publicKey: WireguardKey.WireguardKey(keys.publicKey.subarray(12).toString("base64")),
    privateKey: WireguardKey.WireguardKey(keys.privateKey.subarray(16).toString("base64"))
  };
};
//# sourceMappingURL=wireguardKey.js.map