passwords

User Login with a single query and per-user password salt

这一生的挚爱 提交于 2019-12-06 07:51:13
问题 I've decided to implement a user login using a per-user salt, stored in the database. The salt is prefixed to a password which is hashed with SHA and stored in the databse. In the past when I wasn't using a salt I would use the typical method of counting the number of rows returned by a query using the user inputted username and password. With a per user salt however, you need to get the salt before you can compare it with the stored password hash. So to avoid having two queries (1 to get the

passing password through spring security to dao object

穿精又带淫゛_ 提交于 2019-12-06 07:27:29
I am creating an application using struts2 and spring security and have few problems/questions. How can I pass to DAO the password in order to compare the password and username with results from DB? I understand that the username can be passed by implementing the UserDetailsService and overriding the method public UserDetails loadUserByUsername(String username) The second question is that I got null object from invoking the method SecurityContextHolder.getContext().getAuthentication() in overriden loadUserByUsername() . Why is that? And again - how can I get the password that the users will

watermarked PasswordBox in winrt

耗尽温柔 提交于 2019-12-06 07:09:26
is it possible to get a watermarks passwordbox in WinRt? It is no problem to get a textbox with a watermark, but I don't know a toolkit where I can get a password box with a watermark. How can I implement one for myself? Take a look on WinRT XAML Toolkit . They also have WatermarkTextBox WatermarkPasswordBox By yourself you can implement your own controls: in .xaml: <Border x:Name="brdPassword" Margin="5,0,5,10" BorderThickness="2" BorderBrush="White" CornerRadius="5" Grid.Row="0" Background="White" Height="50" VerticalAlignment="Stretch"> <Grid> <TextBox x:Name="PasswordWatermark"

Password retrieval and storage

大憨熊 提交于 2019-12-06 06:35:45
In my application I have to do repeated calls to webservices which require authentification. The users do not want to repeatedly enter authentification information (username and password). Is there an secure way to store the password at least for the length of the session the application is running, so the user has to enter the data only once? At the moment I hold the password in memory and encrypt it after entering and decrypt it when it is used for the service call. But I feel somewhat uncomfortable with it. Is this a recommend way to handle that kind of data? What about storing a password

How to design system to allow migration of encryption?

廉价感情. 提交于 2019-12-06 06:06:13
问题 I want to set up a system where I am allow to migrate encrypted password (hash password), from one system to another. How would i do this? Say 2 month down the line, i found a encryption that is 10 times better and the current hash function has been proven without a doubt, totally vulnerable. How would I go about migrating user password from one type of hash to another (the better one). 回答1: You can slowly migrate from a method to another using the following technique. I cannot guarantee its

firefox fills in the password into the username field

送分小仙女□ 提交于 2019-12-06 05:57:31
问题 This is weird: if i login to my application, ask firefox to save the username/password. Then log out and go back to the login screen, firefox fills in the password inside the username input field, thus rendering it visible! Any idea what could cause the problem? Here is the html of my form, although i've checked it 10 zillion times. <form action="<?php echo WWWROOT ?>login/" autocomplete="on" method="post" name="extranetLoginForm" id="extranetLoginForm" > <ul id="formlog"> <li id=

Password Recovery without sending password via email

浪子不回头ぞ 提交于 2019-12-06 05:43:24
问题 So, I've been playing with asp:PasswordRecovery and discovered I really don't like it, for several reasons: 1) Alice's password can be reset even without having access to Alice's email. A security question for password resets mitigates this, but does not really satisfy me. 2) Alice's new password is sent back to her in cleartext. I would rather send her a special link to my page (e.g. a page like example.com/recovery.aspx?P=lfaj0831uefjc), which would let her change her password. I imagine I

PBE: Verify password before attempting to decrypt

本小妞迷上赌 提交于 2019-12-06 05:38:41
问题 I am making an application in Java and I want to allow users to encrypt a file (or folder - I'd zip the directory) using a password of their choice. I currently have the following method(s): static Cipher createCipher(int mode, String password) throws Exception { PBEKeySpec keySpec = new PBEKeySpec(password.toCharArray()); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES"); SecretKey key = keyFactory.generateSecret(keySpec); MessageDigest md = MessageDigest

Has anyone used Buzz Andersen's Simple iPhone Keychain code?

不想你离开。 提交于 2019-12-06 05:34:30
You can find it here. I'm trying to understand his sample code in order to write a simple program with that stores passwords into the keychain and retrieves them for login. Has anyone done this before? It would be most appreciated if I can see any examples you may have. There's really no code to demonstrate, he lists both calls there. Heres's an example, for what it is worth: NSError *error; [SFHFKeychainUtils storeUsername:@"fred" andPassword:@"mypassword123" forServiceName:@"myService" updateExisting:YES error:&error]; NSString *storedPassword = [SFHFKeychainUtils getPasswordForUsername:@

Refresh a connection in Excel to SQL Server (with password) using VBA

南笙酒味 提交于 2019-12-06 05:23:45
I have 10 Excel files that are connected to a SQL Server by OLEDB and I need to refresh them everyday one by one manually. When I refresh them I need to insert a password. I tried to make a macro to automate this process, but I didn't succeed. I did this function to automate one of my workbooks: Sub updateABC() Workbooks("Teste").Connections("SQL Server_Azure1").OLEDBConnection.Refresh End Sub And the Excel ask for the password to SQL Server logon. Is there any way to put this password automatically using vba? Thanks. King_nothing6 There is a way in Excel without VBA: You can go to Data then