thread-safe wrapper for pysqlcipher