OK. Just pointing out that my example showed that $decode isn't giving priority to the specified switch, which means the 'z' switch isn't safe to use for any string where the message length is other than a multiple of 8 and the final character is a codepoint 128+ that's a multiple of 64, or binary strings where the final byte value is 0x80.

//bset -t &v 8 0 | while ($bvar(&v,0) == 8) { bset -tc &v 1 $str(.,$rand(1,6)) $+ $chr($calc(64*$rand(2,700))) } | echo -a original: = $bvar(&v,1-) | noop $encode(&v,bmcz,key) $decode(&v,bmcz,key) | echo 4 -a decrypted = $bvar(&v,1-)