I read this book in the late eighties or possibly early nineties. It was basically a young-adult romance, but an unusual one --a lot of it revolved around the use of various codes and ciphers. It was narrated from the point of view of the female heroine. She and the love interest were both in the present, but she was somehow in contact with an earlier time period.
I think in the past time period, there were people who were hiding out to escape one of the religious purges in England during the fights between the Catholics and the Protestants, but I might be conflating two different books here.