Easy way to password-protect php page

Not exactly the most robust password protection here, so please don’t use this to protect credit card numbers or something very important. Simply drop all of the following code into a file called (secure.php), change the user and pass from “admin” to whatever you want. Then right under those lines where it says include(“secure.html”), simply … Read more

Reading a password from std::cin

@wrang-wrang answer was really good, but did not fulfill my needs, this is what my final code (which was based on this) look like: #ifdef WIN32 #include <windows.h> #else #include <termios.h> #include <unistd.h> #endif void SetStdinEcho(bool enable = true) { #ifdef WIN32 HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); DWORD mode; GetConsoleMode(hStdin, &mode); if( !enable ) mode &= … Read more

How to send password securely via HTTP using Javascript in absence of HTTPS?

There is no way to send a password securely that the user can verify without SSL. Sure, you can write some JavaScript that will make a password secure for over-the-wire transmission through hashing or public-key-encryption. But how can the user be sure that the JavaScript itself has not been tampered with by a man-in-the-middle before … Read more

In Java, is there still a point in using char[] instead of String to store passwords?

First, let’s recall the reason for the recommendation to use char[] instead of String: Strings are immutable, so once the string is created, there is limited control over the contents of the string until (potentially well after) the memory is garbage collected. An attacker that can dump the process memory can thus potentially read the … Read more

What are Salt Rounds and how are Salts stored in Bcrypt?

With “salt round” they actually mean the cost factor. The cost factor controls how much time is needed to calculate a single BCrypt hash. The higher the cost factor, the more hashing rounds are done. Increasing the cost factor by 1 doubles the necessary time. The more time is necessary, the more difficult is brute-forcing. … Read more

Non-random salt for password hashes

Salt is traditionally stored as a prefix to the hashed password. This already makes it known to any attacker with access to the password hash. Using the username as salt or not does not affect that knowledge and, therefore, it would have no effect on single-system security. However, using the username or any other user-controlled … Read more

techhipbettruvabetnorabahisbahis forumuedusedueduseduseduseduseduedueduedu