Completed Master Secret encryption and supporting code files with unit tests