MCPcopy Create free account
hub / github.com/codetheweb/tuyapi / getKey

Method getKey

lib/cipher.js:275–277  ·  view source on GitHub ↗

* Gets the key used for encryption/decryption * @returns {String} sessionKey (if set for protocol 3.4, 3.5) or key

()

Source from the content-addressed store, hash-verified

273 * @returns {String} sessionKey (if set for protocol 3.4, 3.5) or key
274 */
275 getKey() {
276 return this.sessionKey === null ? this.key : this.sessionKey;
277 }
278
279 /**
280 * Returns the HMAC for the current key (sessionKey if set for protocol 3.4, 3.5 or key)

Callers 7

_encryptPre34Method · 0.95
_encrypt34Method · 0.95
_encrypt35Method · 0.95
_decryptPre34Method · 0.95
_decrypt34Method · 0.95
_decrypt35Method · 0.95
hmacMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected