Optimized _encrypt