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

Function sshString

ui/src/utils/sshKey.ts:14–19  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

12}
13
14const sshString = (bytes: Uint8Array): Uint8Array => {
15 const out = new Uint8Array(4 + bytes.length);
16 new DataView(out.buffer).setUint32(0, bytes.length);
17 out.set(bytes, 4);
18 return out;
19};
20
21const toBase64 = (bytes: Uint8Array): string => {
22 let binary = "";

Callers 1

encodeOpenSshEcdsaP256Function · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected