I have managed to acquire a copy of Alfred Hitchcock's Sinister Spies and it is Edgar Wallace's "Code No. 2". I was incorrect in my memory of there being an X-Ray camera involved. Instead, it is a clockwork box, with the pretense that it is an invention for wireless transmitting, to be stored in the same safe as the eponymous "Code No. 2" for safekeeping.
Immediately beneath the box was Code 2, enclosed in a leather binder, the edges of which were bound, for durability's sake, with the thin ribbon steel.
Now, slowly the cover of the book was rising. It jerked up a little, then fell, leapt again and fell back, as though there were something inside which was struggling to get free. Then, of a sudden the cover opened and remained stiffly erect, forming, with the contents, the letter L, the upright of which was the cover.
There was a "click," and the interior of the safe was illuminated with a soft greenish radiance. It threw a glow upon the top page of the code which lasted for nearly a minute. Then it died away and the cover of the book fell.
....
Half of the box was taken up by accumulators. They supplied the current which, operating through a powerful magnet lifted the cover of the code-book. They gave the light to the wonderful little mercurial-vapor lamps, which afforded the concealed camera just enough light to make an effective exposure.
The resolution of the story was different from my memory as well. The code is almost entirely made off with (the conceit is that the contents of the book are in loose-leaf, and are often returned in random order after usage, so after many operations, only three pages were unknown by scanning that first page for many days). After the spy is eliminated, the ultimate revelation is that
The code is hidden in his room as Braille on the wallpaper, as Schiller's father, a former watchmaker, had gone completely blind in his old age.
For what it is worth, the story with the grenade trap is "The Uninvited" by Michael Gilbert.
"You have not, perhaps, seen one of these before? It works on the same principle as a Mills grenade, but is six times as powerful and is incendiary as well as explosive. When I shut this door, I shall bolt it and hang the grenade from the upturned bolt. The least disturbance will dislodge it. It is powerful enough to blow the door down."
....
"If I'm meant to look after you, I ought to look after you properly," said Mr. Behrens. "Not let myself get jumped by an amateur like that. I hadn't reckoned on him blocking the door with a grenade. I had to break out of the window, and it took me nearly half an hour."