Code me, Kate: British royal opens museum at restored WWII deciphering center, Bletchley Park

Britain's Kate, Duchess of Cambridge arrives for a visit at Bletchley Park, near Milton Keynes, England, Wednesday, June 18, 2014. The Duchess will view the restored location, tour the WWII Codebreaking Huts and will hear about the achievements of the Codebreakers whose work is said to have helped shorten the World War II by two years. (AP Photo/Lefteris Pitarakis) (The Associated Press)

Britain's Kate, Duchess of Cambridge arrives for a visit at Bletchley Park, near Milton Keynes, England, Wednesday, June 18, 2014. The Duchess will view the restored location, tour the WWII Codebreaking Huts and will hear about the achievements of the Codebreakers whose work is said to have helped shorten the World War II by two years. (AP Photo/Lefteris Pitarakis) (The Associated Press)

Britain's Kate, Duchess of Cambridge meets officials as she arrives for a visit at Bletchley Park, near Milton Keynes, England, Wednesday, June 18, 2014. The Duchess will view the restored location, tour the WWII Codebreaking Huts and will hear about the achievements of the Codebreakers whose work is said to have helped shorten the World War II by two years. (AP Photo/Lefteris Pitarakis) (The Associated Press)

The Duchess of Cambridge has tried her hand at code-breaking as she opened a museum at Bletchley Park, Britain's famed World War II deciphering center.

Kate sat at a desk and succeeded in decoding a Morse code message as she toured the center, which has been restored with an 8 million-pound ($13.6 million) lottery fund.

The royal has a family link to the park: Her paternal grandmother, Valerie Glassborow, was a civilian staff member there during WWII.

Code-breakers at Bletchley Park were credited with shortening the war by breaking German cypher systems — code-named Enigma and Lorenz.

The site fell into disrepair after the war, but a year-long project has restored its wartime appearance and added exhibitions and visitor facilities.