Synapse
Compatibility functions enabled by the Synapse setting.
Functions
syn.create_secure_functionProvide a compatibility placeholder for scripts expecting this name. The name exists for compatibility, but it does not wrap, protect, or return a supplied callback. Code requiring that behavior must not rely on this placeholder.
syn.crypt.custom.decryptDecrypt Base64 ciphertext using an explicitly selected cipher and raw key material. Use it to reverse the matching custom encryption call. This interface expects raw key and IV bytes, unlike the Base64 key and IV arguments of crypt.decrypt.
syn.crypt.custom.encryptEncrypt bytes using an explicitly selected cipher and raw key material. Use it when the cipher and raw key format must be chosen explicitly. The example generates a fresh nonce for AES-GCM and retains it for decryption.
syn.crypt.custom.hashCompute a digest using one of the Synapse compatibility library’s supported algorithms. Use it to select a digest algorithm while keeping the compatibility calling convention. The algorithm is the first argument here; crypt.hash takes the data first.
syn.crypt.decryptDecrypt an envelope produced by syn.crypt.encrypt. Use it to restore data saved by the matching compatibility encryption function. The same input key material must be available at decryption time.
syn.crypt.deriveDerive a byte string from input material using the compatibility library’s HKDF-SHA-256 derivation. Use it to expand existing key material into a reproducible byte sequence. Derivation is not random generation and does not turn a weak password into a strong secret.
syn.crypt.encryptEncrypt a byte string using the Synapse compatibility library’s local ciphertext format. Use it when both sides of a local data round trip use this compatibility format. Its output cannot be substituted for the separate ciphertext and IV returned by crypt.encrypt.
syn.crypt.hashCompute a SHA-384 digest of a byte string. Use it when a file fingerprint specifically requires SHA-384. The fixed algorithm makes this different from crypt.hash, which takes an algorithm argument.
syn.crypt.randomGenerate random bytes through the Synapse compatibility library. Use it when this compatibility library needs raw random key material. Encode the bytes separately if the next operation requires printable text.
syn.is_betaRead the beta flag exposed by the Synapse compatibility library. Use it only to satisfy code that expects this compatibility flag. Its constant true result does not identify the Kawaii release channel; use identifyexecutor for build information.