passwords

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

孤者浪人 提交于 2019-12-02 05:48:23
问题 I'm having troubles with my project , it involves JDBC and Mysql connection . When I do the following : private Statement m_statement = null; // statement private Connection m_connection = null; // connection /** * Constructor #1 of the Database class * @throws ClassNotFoundException */ public Database() throws ClassNotFoundException { try { Class.forName("com.mysql.jdbc.Driver"); MysqlDataSource ds = new MysqlConnectionPoolDataSource(); ds.setServerName("localhost"); ds.setPort(3306); ds

How can I pass my ID and my password to a website in Python using Google App Engine?

半世苍凉 提交于 2019-12-02 05:42:22
Here is a piece of code that I use to fetch a web page HTML source (code) by its URL using Google App Engine: from google.appengine.api import urlfetch url = "http://www.google.com/" result = urlfetch.fetch(url) if result.status_code == 200: print "content-type: text/plain" print print result.content Everything is fine here, but sometimes I need to get an HTML source of a page from a site where I am registered and can only get an access to that page if I firstly pass my ID and password. (It can be any site, actually, like any mail-account-providing site like Yahoo: https://login.yahoo.com

django & facebook: security & design for a facebook webapp that performs a third party login on behalf of the user

蓝咒 提交于 2019-12-02 05:13:35
I'm writing a Facebook canvas webapp that performs a login (using urllib) to a third party website and performs actions on behalf of the user. This means I have 2 accounts; the account the user has with my webapp (via facebook) and the account the app uses to perform a login on their behalf (with user/password details provided by the user). I obviously don't want plaintext passwords in the DB. But I also don't want the user to have to enter their password every time they perform an action. I want them to enter the password once when they sign up, and I want to encrypt the passwords, but what

Where to store keysytore password?

。_饼干妹妹 提交于 2019-12-02 05:11:06
Every example I see says to use a strong password but then they just slap it in the source code. That doens't seem quite right to me. Is it possible to authenticate to the keystore as the current account so no passwords are involved? If that's not possible, I have a requirement to not store passwords in source code, which is perfectly acceptable, but it seems like at some point a password needs to be a part of the equation, can someone point me to the most secure way to handle this? I'm tempted to add the password as part of the build, but then I have a plaintext password on the build server,

Converting SHA1 to normal form

一世执手 提交于 2019-12-02 04:10:25
I have a database where every password is passed via SHA1. Sometimes, I want to go to the users dashboard and look how it feels like. Is there a way, I could convert SHA1 to normal form just for testing purposes? Thank You If by "normal form" you mean "can I retrieve the string that created a given hash", the answer is no. And it should be NO, because that's the whole point of secure hashes: make it very easy to create, extremely complicated (ideally impossible) to revert, otherwise, why on Earth would you make a secure hash? If you are trying to hack on the user's accounts, then I suggest you

password_verify php not match

别等时光非礼了梦想. 提交于 2019-12-02 03:44:13
问题 I try to check the password with the function password_verify with the posted user password and the hash from database. First, how I generate the password and hash: $user_password = $this->generate_password(); private function generate_password($length = 8) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; $password = substr( str_shuffle( $chars ), 0, $length ); return $password; } define("HASH_COST_FACTOR", "10"); $hash_cost_factor = (defined(

Javascript Show/Hide toggle button for password field

≯℡__Kan透↙ 提交于 2019-12-02 03:32:18
I have been working on a project that requires me to implement a Show/Hide button on a form password field, that toggles between showing the password as plaintext, and hiding it behind asterisks. What I came up with so far: function pass(){ document.getElementById('password').type="password"; } function text(){ document.getElementById('password').type="text"; } <input type="password" id="password" /> <button class="ui-component__password-field__show-hide" type="button" onclick="text()">Show</button> It works fine for switching to showing the password, but how do I make it change the text of

Securely storing credentials that can't be encrypted

橙三吉。 提交于 2019-12-02 03:31:35
问题 I have a client that's running an aggregator of information from multiple accounts. The database needs to store usernames and password to other websites in a way that can be used later by a script to log into those websites to retrieve data. Rather than store them as plain text, I'm thinking we can hash them for storage. Obviously, someone could still access the plain text version if they had access to both the code and the database, but not if they only had one or the other. Any better ideas

Authentication with bcrypt hashed password

岁酱吖の 提交于 2019-12-02 03:02:58
In my C++ application, user must login in order to use the application. The user login data are taken from phpBB 3.1 database, which uses for password hashing bcrypt. However, I didn't found any suitable example for C++. So my question is: How I can auth user with bcrypt hashed password in C++? I know how to do authentication from external database in C++, I just need help with the bcrypt. Thank you! BCrypt is really not as common as it could be, but there is a Stackoverflow question on What's the recommended Bcrypt C implementation? that will point you to Openwall's crypt_blowfish . Given a

storing passwords in sql server database using ef core code first

微笑、不失礼 提交于 2019-12-02 02:48:05
问题 I have this class to represent my users: public class User { public int ID {get; set;} public string UserName {get; set;} [DataType(DataType.Password)] public string Password {get; set;} } A simplistic version of my register method looks like this: [HttpPost] Register(User newUser) { ... _context.add(newUser); await _context.SaveChangesAsync(); ... } So my question is: Should I alter the password type from a regular string before storing? If so, to what data type? 回答1: YES YES YES Never store