Just some thoughts for doing this:
- Have a
KeyStorage interface with getSecretKey() method
- Let the user pass their KeyStorage object in the initialization
Going this route, you might also have an EnvStorage interface to allow for alternate ways of storing the encrypted environment variables. Implementing this might help keep away from dreaded major version releases.