Restrictions that allow to protect variables from external/ unintended modification.
Questions tagged [access-protection]
10 questions
30
votes
3 answers
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…

Georg Fritzsche
- 97,545
- 26
- 194
- 236
27
votes
10 answers
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…

Jonas
- 121,568
- 97
- 310
- 388
18
votes
4 answers
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…

Georg Fritzsche
- 97,545
- 26
- 194
- 236
5
votes
2 answers
How to hide a datum from everyone but class T
I want a type A that will yield its hidden datum to an object of type T but hide the datum from everyone else. My C++ compiler happens to be GCC 4.4, but that shouldn't matter. Why won't this work?
#include
template class A…

thb
- 13,796
- 3
- 40
- 68
3
votes
2 answers
C++: Can't figure out how to hide implementation details properly
I have the following setup:
foo.h:
class A {
friend class B;
private:
A() {}
};
class B {
public:
void addObject(Object &o); // adds to myMember; A is not exposed!
void computeResult(Result &r); // uses myMember to compute…

bombax
- 1,189
- 8
- 26
1
vote
2 answers
How does a java child class inherit access-protected parent fields?
This is a beginner question, but I've googled around and can't seem to find an answer.
Say I have a class person:
class Person {
private String SSN;
//blah blah blah...
}
and then I create a subclass OldMan:
class OldMan inherits Person {
…

Joseph Morgan
- 210
- 2
- 8
0
votes
2 answers
C# Prevent Access to a Folder When Opening?
is it possible to create a code for this? (prevent access to a folder?)
or do something similar to achieving this goal?
i just want that when my program is running. my application folder cannot be access through (example MyDocuments)

Katherina
- 2,153
- 7
- 26
- 34
0
votes
0 answers
pdfbox how can i check a pdf edit permission
I have a pdf which is restricted on Signing permission.
I try to use pdfbox AccessPermission to check the edit permission before signing it. But in the source code of AccessPermission, i did not find the corresponding access permission, either…

ryuukei
- 23
- 8
0
votes
1 answer
How to create/manage temporary links to my protected content?
I have some content (static html-files) on hosted Webspace with Apache, MySQL & PHP5.
I want to protect this content, so it can't be accessed (via htaccess maybe?). Then I want to create temporary URLs, which I can send to certain people. If they…

ɥɔǝnq ɹǝƃloɥ
- 661
- 1
- 6
- 4
-1
votes
1 answer
Web site theat blocks loading content from certain sites or domains
I am worried that my web may be hacked (apache + joomla 3). Most of hacks consist on placing spam on posts or sending information to other websites in other domains/IPs.
I am thinking about a security protection, maybe done with .htaccess that…

Tor
- 141
- 8