hiloop-sdk 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/crypto.js +0 -4
- package/package.json +1 -1
package/dist/crypto.js
CHANGED
|
@@ -141,10 +141,6 @@ export class CryptoContext {
|
|
|
141
141
|
}
|
|
142
142
|
/** Compute X25519 ECDH shared secret with the recipient (space) public key. */
|
|
143
143
|
getSharedSecret() {
|
|
144
|
-
if (!this.recipientPublicKeyB64) {
|
|
145
|
-
throw new Error("Space public key not available. This usually means the space has no encryption keys yet — " +
|
|
146
|
-
"ensure a human user has logged into the space at least once to generate keys.");
|
|
147
|
-
}
|
|
148
144
|
const sk = util.decodeBase64(this.secretKeyB64);
|
|
149
145
|
const pk = util.decodeBase64(this.recipientPublicKeyB64);
|
|
150
146
|
return util.encodeBase64(nacl.scalarMult(sk, pk));
|