access-protection

How to name this key-oriented access-protection pattern?

Apparently this key-oriented access-protection pattern: class SomeKey { friend class Foo; SomeKey() {} // possibly non-copyable too }; class Bar { public: void protectedMethod(SomeKey); // only friends of SomeKey have access }; ... doesn't have a known name yet, thus i'd like to find a good one for it so we can refe...

Can we increase the re-usability of this key-oriented access-protection pattern?

Can we increase the re-usability for this key-oriented access-protection pattern: class SomeKey { friend class Foo; // more friends... ? SomeKey() {} // possibly non-copyable too }; class Bar { public: void protectedMethod(SomeKey); // only friends of SomeKey have access }; To avoid continued misunderstandings, ...

How to protect against direct access to images?

I would like to create a web site with many images. But I would like to protect against direct access to images, e.g. direct links to images without visiting the web site. What is the preferred way to do this? And what are the alternatives with Pros and cons? I have some ideas (I don't know if they are possible): File permissions PH...