Questions tagged [information-hiding]
Information hiding is the ability to prevent certain aspects of a class or software component from being accessible to its clients, using either programming language features (like private variables) or an explicit exporting policy.
information-hiding
134
questions
-1
votes
0
answers
16
views
SerilogAdapter needs More Encapsulation & Information Hiding in order to Completely encapsulate & hide 3rd-party Seilog API modules from Client code
Here is info about our technical development environment :
Microsoft Visual Studio 2022
.NET 6.0
C# 10
Serilog
Serilog.Sinks.Datadog.Logs
Serilog.Sinks.PeriodicBatching
I created an Adapter ...
2
votes
2
answers
109
views
TypeScript functions within functions vs. private functions
Here is a hypothetical example:
I have a market.service.ts with 2 functions called buy() and sell() which are each 100 lines of code
export class ShopService {
public async buy() {
// 100 lines ...
2
votes
0
answers
1k
views
How to hide database credentials in Spring Boot application?
SOLVED
Solution:
Using Jasypt. You can click here for more information how to set up. There is just one thing to mention. For me, it didn't work as if I configure the application.properties as they ...
0
votes
0
answers
28
views
How should I keep my website hidden from the general public and give only a few people access to it?
I have a website, and I am planning for a pre-pilot release. I need to keep my website hidden from the general public and only can have access to a limited number of people (3-5 people ).
Currently, ...
0
votes
2
answers
326
views
Does this break the abstraction barrier?
If a method returns a private field which is type casted, does this consider as breaking the abstraction barrier?
e.g.
private Object thing;
public getThing() {
return (String) thing;
}
0
votes
1
answer
169
views
How to exchange a number between two processes securely
Here is the sample code for myapp1 and myapp2:
myapp1 code:
int main(int argc, char *argv[])
{
int secret = 123;
char buffer[20];
sprintf(buffer,"%d",secret);
char *argv[...
2
votes
1
answer
488
views
How to hide a secret key on a user's machine(NOT your own server)?
This question has been asked HUNDREDs of times, and there are HUNDREDs of articles on how to do this, but ALL of them only speak of environment variables, which won't work in my scenario, since the ...
0
votes
1
answer
254
views
How to organize Java-Project without packages?
I am working on a java-library and due to information-hiding, I was forced to move all my java-files into a single package in order to mark some of them as package private.
Is there any way to some ...
0
votes
1
answer
340
views
Hide sensitive data on Firebase Hosting [duplicate]
I am using my react, redux, firebase, Firestore, auth project and uploaded my project on free google Firebase Hosting.
I am newbie
when I goto inspect and check the console and other code.
my code and ...
0
votes
2
answers
637
views
Count number of instances using a metaclass in Python
I've written a metaclass which counts the number of instances for each of its children class.
So my meta has a dict like {classname: number_of_instances}.
This is the implementation:
class MetaCounter(...
0
votes
1
answer
957
views
How to formulate pylint rule to allow private variable starting with `__`
Basically I have a class with a private variable:
class MyClass:
def __init__(self, abAb):
self.__abAb = abAb
Now, pylint complains:
Attribute name "__abAb" doesn't conform to ...
0
votes
1
answer
272
views
Multiple rows hiding in VBA
I have an Excel sheet that I'm trying to put multiple condition to hide rows. 2 of them is hiding some rows if a specific cells equal 0, one of them is hiding some rows if a specific cell has a ...
0
votes
1
answer
437
views
How to hide dependencies of implementation of template class?
In regular C++ classes, we can have a class A as follows:
in A.h:
class A {
public:
void method();
// rest of class declaration
};
in A.cpp:
#include "A.h"
#include "...
0
votes
3
answers
67
views
Why is privacy on a per-class basis but const doesn't work across objects of the same class?
I decided to try something out of curiosity to see how it would work. I got it into my head to see if one object of a class could access the private variables of another object of the same class. ...
1
vote
0
answers
165
views
how to hide files or content in file manager in both android ios
Hi i am developing a reader mobile application in xamarin.forms. once user downloading the book it will download zip file. so when user click on read that time i am unzipping and showing content. ...