xlab-si / emmy

Library for zero-knowledge proof based applications (like anonymous credentials)
Apache License 2.0
233 stars 54 forks source link

Make SessionManager an interface #108

Closed mancabizjak closed 6 years ago

mancabizjak commented 6 years ago

This commit introduces SessionManager as an interface with a GenerateSessionKey() method. Emmy server now contains a field that must implement this interface. This decoupling will support easier refactoring in the future, as we will be able to easily switch to a different implementation of session key generation.

Existing session key generation logic was moved to the interface method of the RandSessionKeyGen struct.