Re-write encryption script using simplified interface