Update encrypt API; use files instead of streams