MCPcopy
hub / github.com/streetwriters/notesnook / exportKey

Method exportKey

packages/crypto/src/keyutils.ts:74–81  ·  view source on GitHub ↗
(
    sodium: ISodium,
    password: string,
    salt?: string
  )

Source from the content-addressed store, hash-verified

72 }
73
74 static exportKey(
75 sodium: ISodium,
76 password: string,
77 salt?: string
78 ): SerializedKey {
79 const { key, salt: keySalt } = this.deriveKey(sodium, password, salt);
80 return { key: sodium.to_base64(key), salt: keySalt };
81 }
82
83 static exportKeyPair(sodium: ISodium): SerializedKeyPair {
84 const { publicKey, privateKey } = this.deriveKeyPair(sodium);

Callers

nothing calls this directly

Calls 2

deriveKeyMethod · 0.95
to_base64Method · 0.65

Tested by

no test coverage detected