MCPcopy Create free account
hub / github.com/Cosmian/kms / buildCreateSplitKeyRequest

Function buildCreateSplitKeyRequest

ui/src/utils/splitKeyUtils.ts:10–20  ·  view source on GitHub ↗
(keyId: string, n: number)

Source from the content-addressed store, hash-verified

8
9/** Build a `CreateSplitKey` TTLV request for an AES-256 symmetric key. */
10export const buildCreateSplitKeyRequest = (keyId: string, n: number) => ({
11 tag: "CreateSplitKey",
12 type: "Structure",
13 value: [
14 { tag: "ObjectType", type: "Enumeration", value: "SymmetricKey" },
15 { tag: "UniqueIdentifier", type: "TextString", value: keyId },
16 { tag: "SplitKeyParts", type: "Integer", value: n },
17 { tag: "SplitKeyThreshold", type: "Integer", value: n },
18 { tag: "SplitKeyMethod", type: "Enumeration", value: "XOR" },
19 ],
20});

Callers 3

CryptoOfficerRoleFunction · 0.90
onFinishFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected