information-hiding

Is it possible to hide a password defined within C++ code

与世无争的帅哥 提交于 2021-02-04 17:16:23
问题 ... so that browsing the disassembly won't immediately expose the password (declared as a static variable). As an example, imagine a program that has a zip file attached that it must open for assets but is not easily accessible to prying eyes. I know that it is impossible to completely hide or protect that zip but I'm curious what means are available to at least hold off a casual snooper. Thanks! 回答1: No but there are things you can do to make it harder. Store the password as a series of

Hiding my app on my website

早过忘川 提交于 2019-12-24 13:23:31
问题 Right now I have an application on my website that users can easily download from my website, is there a way to hide or make it really hard to be able to find my application, so people can't just add /files/App.exe into the end of my domain to get my app? What do you recommend? 回答1: Hiding your exe could be accomplished by Create a unique identifier (perhaps a GUID) Associate this with a file name for download and an expiration date (in a DB, perhaps) Create a page that takes the unique ID as

Java class containing only private members

帅比萌擦擦* 提交于 2019-12-24 00:03:38
问题 Lately I met a situation where I needed to create a custom VideoView to my android application. I needed an access to the MediaPlayer object and to add some listeners. Unfortunately (for me), all members of the VideoView class are private, so even extending the class wouldn't help me to gain access to its MediaPlayer object (or anything else), I had to make a complete duplicate of the class with my modifications. Well, although it is sound like I'm complaining for the "hard work", it is

Do Subclasses Inherit Private Instance Variables From Superclasses

感情迁移 提交于 2019-12-21 00:53:46
问题 Do subclasses inherit private fields? This question addresses the same problem but I don't quite understand how that satisfies the (seemingly) contradictory situations below. http://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html Says that "A subclass does not inherit the private members of its parent class." This means that it neither inherits private instance variables nor private methods right? However, how does this work if it inherits a public accessor method from its parent?

Information-hiding in Groovy (using closures? naming conventions?)

空扰寡人 提交于 2019-12-13 02:47:02
问题 This follows from my unsuccessful attempt to find an answer to this question from 2014. It's not clear to me whether there might in fact be some techniques in Groovy to use closures, specifically, to hide information. All I can say is that if information on such techniques is out there it is a perfect illustration, precisely, of "information-hiding": I cannot find it! But failing that I think my understanding now is that absolutely zero attempt to hide information (or pretend to, as in Java -

Information Hiding the “Swifter” way?

依然范特西╮ 提交于 2019-12-12 07:38:43
问题 I have a question regarding object oriented design principles and Swift. I am pretty familiar with Java and I am currently taking a udacity course to get a first hands on in Swift. In the Java community (basically in every community that follows OOP) it is very common to use information hiding techniques such as hiding or encapsulating data within classes to make sure it cannot be manipulated from outside. A common principle is to declare all attributes of a class as being private and use

Information Hiding the “Swifter” way?

大憨熊 提交于 2019-12-03 10:04:19
I have a question regarding object oriented design principles and Swift. I am pretty familiar with Java and I am currently taking a udacity course to get a first hands on in Swift. In the Java community (basically in every community that follows OOP) it is very common to use information hiding techniques such as hiding or encapsulating data within classes to make sure it cannot be manipulated from outside. A common principle is to declare all attributes of a class as being private and use getters for retrieving an attribute's value and setters for manipulation. I tried to follow this approach

A brilliant example of effective encapsulation through information hiding?

陌路散爱 提交于 2019-12-03 09:36:52
问题 " Abstraction and encapsulation are complementary concepts: abstraction focuses on the observable behavior of an object... encapsulation focuses upon the implementation that gives rise to this behavior... encapsulation is most often achieved through information hiding , which is the process of hiding all of the secrets of object that do not contribute to its essential characteristics." - Grady Booch in Object Oriented Analysis and Design Can you show me some powerfully convincing examples of

A brilliant example of effective encapsulation through information hiding?

那年仲夏 提交于 2019-12-02 23:49:47
" Abstraction and encapsulation are complementary concepts: abstraction focuses on the observable behavior of an object... encapsulation focuses upon the implementation that gives rise to this behavior... encapsulation is most often achieved through information hiding , which is the process of hiding all of the secrets of object that do not contribute to its essential characteristics." - Grady Booch in Object Oriented Analysis and Design Can you show me some powerfully convincing examples of the benefits of encapsulation through information hiding? The example given in my first OO class:

Writing/implementing an API: testability vs information hiding

痞子三分冷 提交于 2019-12-02 03:56:29
问题 Many times I am involved in the design/implementation of APIs I am facing this dilemma. I am a very strong supporter of information hiding and try to use various techniques for that, including but not limited to inner classes, private methods, package-private qualifiers, etc. The problem with these techniques is that they tend to prevent good testability. And while some of these techniques can be resolved (e.g. package-privateness by putting a class into the same package), others are not so