Updated API and implemented C extension for TCTP encryption