The Transform secrets engine allows Vault to encode and decode sensitive values residing in external systems such as databases or file systems, ensuring that even if the data is leaked, the encoded secrets remain uncompromised. The engine can encrypt data while preserving formatting or partially encrypt data based on a user-configurable formula, simplifying the process of managing sensitive information. To use the Transform engine, roles, transformations, templates, and alphabets need to be configured. Roles define the set of transformations allowed, transformations hold information about a particular transformation, templates determine what data is encrypted, and alphabets provide the custom character set used in the resulting ciphertext. The engine can be integrated into an application using Vault's API, allowing for secure encoding and decoding of sensitive data without managing the configuration itself.