Working version (without XXTEA).