Parse encryption information into a datatype

Fixes #5