Factor symmetric encryption into SymmetricKey class