Login dialog with ecncrypted password
Hi there,
I developed a Java application that has an initial JDialog
frame where the user enters his/her name and password.
Then I access a database and check if the password is
the right one, enabling or not the user to continue
loading the app.
Since I'm new to security and stuff, I was wondering
if anybody could send to me some code showing
how I can :
1) Encrypt the password from the JPasswordField
2) Decrypt the password that is stored on the
database
3) Check if they are the same.
What should I download from Sun's website ?
What are the steps to implement what I want ?
Of course I'll be using the same encryption method
to build a frame where the user stores his/her own
password, right ?
If possible, please send the code to [email protected]
Thanks a lot
Hi I am giving you the code with which you can do basic encryption and decryption. You can add encryption code in the class where you are displaying password dialog and send it then you decrypt and save it in data base.
One suggestion for you.
It will be a good idea to store password in encrypted form in the database. when you get username and password from log in encrypt it and compare both password in encrypted form. Never decrypt it.
code is not nicely written but works. So,hope it might solve your problem.
Enjoy it :)
Bhavesh
import sun.misc.*;
public class TestEncrypt{
static String temp = "pass";
BASE64Encoder encoder;
BASE64Decoder decoder;
String encodedStr;
byte [] testPass;
public TestEncrypt(){
encoder= new BASE64Encoder();
decoder = new BASE64Decoder();
try{
testPass = temp.getBytes();
encodedStr = encoder.encodeBuffer(testPass);
System.out.println(new String(encoder.encodeBuffer(testPass)));
if(temp.equals(new String(decoder.decodeBuffer(encodedStr))))
System.out.println("HI BOTH are same");
else
System.out.println("BOth are no same");
}catch(Exception ex){ex.printStackTrace();}
public static void main(String args[]){
new TestEncrypt();
Similar Messages
-
I can happily connect my home computers and phone to sync and I have confirmed they sync between themselves. However, my work computer has recently stopped being able to sync where it has previously been fine for well over a year. I am on the latest version of sync and Firefox 35.0.1 (both at home and work).
When I try to reconnect to sync I am directed to the "Sign in to continue" page. It has my correct email address/account name. I enter my password (clicking "Show" to make sure it's correct) but then it always fails with "Incorrect password" in a red banner at the top. I have checked the password is correct and logged out and back in from home using the same password so I know that is correct. I have tried this logged in to work via remote desktop so I could do both at the same time to make sure there isn't just a prevailing sync server problem.
Obviously my work computer is behind a proxy/firewall. I have recently had to add a new certificate as a result of proxy changes to get internet connectivity working. Anecdotally, I think sync stopped working at a similar time - but it's always easy to remember these things differently when you're looking for a solution. So this could be a red herring.
Your help in getting this fixed would be much appreciated!Thanks for your reply.
i've deleted all cookies, although I don't really understand how that relates. I have also spoken to our sysadmin who says we don't block access to firefox accounts per se, we do block all file-esque uploads. However, I am not sure this would make any difference to the exact problem I am seeing which is that I can't sign in to my firefox sync account. But maybe signing in to this account is different to a "normal" account - maybe there is more of a two way handshake which relies on sending some encrypted data which appears to our proxy like a file being uploaded out of the company.
I got a slightly different error on my latest clear down and retry, in that the sign in just waited forever (overnight) without success.
Any further help gratefully received... -
U410 hangs at login screen with no password box or username box
So I received some virus quarantines yesterday and removed then but then when through my program files and researched/removed suspicious folders mostly. Went to restart my computer and it now hangs at the login screen with just the Windows login screen background. On startup it runs a memory check and then asks if I want to start in safe mode. Both modes hang at the login screen. So I downloaded the recovery disk because I didn't do the one click backup. I connect my external drive and change the boot order, then restart and it doesn't take me to my external blu ray drive to boot my CD from. Any suggestions here? Highly appreciated.... I am not under warranty.
LenBlazer wrote:
A cd or usb flash drive will do. You have to go to bios and change the boot order. However, usually you don't see the cd/Dvd in the boot option so that is why I suggest using the flash drive. BTW, don't forget to disable secure boot when running the program.
@ the OP: did you disable secure boot?
Z.
The large print: please read the Community Participation Rules before posting. Include as much information as possible: model, machine type, operating system, and a descriptive subject line. Do not include personal information: serial number, telephone number, email address, etc. The fine print: I do not work for, nor do I speak for Lenovo. Unsolicited private messages will be ignored. ... GeezBlog
English Community Deutsche Community Comunidad en Español Русскоязычное Сообщество -
Login with encrypted password doesn't work
Hi, simple problem:
in login settings with encrypted password option on
The login doesn't work => Error:"AFTER.Trigger_Login_CheckLogin*"
(tested with a user that has an encrypted password)
without encrypted password
The login works
(tested with a user that has a clean password)
Where I wrong?
Thanks
GabrieleHi Gabriele,
how many varchars did you define for the column that´s holding the encrypted passwords ? It has to be at least 32 chars due to the MD5 encryption, if it´s lesser than that, the passwords will get truncated.
Cheers,
Günter Schenk
Adobe Community Expert, Dreamweaver -
I am developing an online shopping center where the user needs to login if he wants to purchase any item. So login window should be shown for this. I am not getting any idea about this login screen. My login screen should do the following.
text fields to get user name & password, there should be 4 buttons
1.Sign in
2. Cancel
3. Forgot password
4. Create account.
if the login details are correct then the login dialog should be disposed & the control should return to the application. If the login details entered doesn't exist in database then an error dialog should be shown & after pressing the ok of the error dialog the control should return to the login dialog with all empty fields.
Forgot password should take the username which is the email id of the user & send a mail to the user with the password. create account should open a new window with all the details necessary for the account.
please tell me how should i go about in this. i had done a login dialog before but that only contains a yes_no option only. that time i created a jpanel with all fields then a joptonpane with this jpanel & i put the joptionpane in a jdialog's contentpane.
any help would be appreciated. even if you don't know how to do the complete problem just share whatever knowledge you have on this.We use something like this... :
private void showLoginPopUp() {
JTextField nameField = new JTextField();
JPasswordField passField = new JPasswordField();
int option = JOptionPane.showOptionDialog(null, new Object[] {"Name", nameField, "Password",
passField}
, "Login", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
if ((option == JOptionPane.CLOSED_OPTION) || (option == JOptionPane.CANCEL_OPTION)) {
System.exit(0);
userID = nameField.getText();
password = new String(passField.getPassword());
if (!isValidLogin(userID, password)) {
showLoginPopUp();
As you can see, passing an array of objects as the message allows for a more customizable... look. Of course, this does not handle 'Forgot Password'... good luck. (if its not already too late). -
I created second email account ([email protected]) with a Password but when I try to get mail and enter password, it says "Sending of Password did not succeed. Mail server mail.comcast.net responded: login failed". What am I doing wrong?
Have you logged on to the webmail account using a browser and enabled either Pop or Imap forwarding for that email address?
Have you created a mail account in Thunderbird that uses the chosen webmail forwarding option?
Password - make sure caps lock is not switched - it must be the same password you use to access the webmail account.
check:
Tools > account Settings > Server Settings
username = full email address
Please post info:
In Thunderbird
Help > Troubleshooting information
click on 'copy text to clipboard'
paste info in this question
edit /remove all info on fonts and printers. -
Problem description:
Computer takes a long time to fire up. Spinning ball is seen during start up, sometimes when login dialog box, and sometimes after entering login password. My mac freeze often, especially when using Lightroom…. Help is much appreciated!
EtreCheck version: 2.0.11 (98)
Report generated 3. november 2014 kl. 01.23.41 CET
Hardware Information: ℹ️
MacBook Pro (13-inch, Mid 2010) (Verified)
MacBook Pro - model: MacBookPro7,1
1 2.4 GHz Intel Core 2 Duo CPU: 2-core
4 GB RAM Upgradeable
BANK 0/DIMM0
2 GB DDR3 1067 MHz ok
BANK 1/DIMM0
2 GB DDR3 1067 MHz ok
Bluetooth: Old - Handoff/Airdrop2 not supported
Wireless: en1: 802.11 a/b/g/n
Video Information: ℹ️
NVIDIA GeForce 320M - VRAM: 256 MB
Color LCD 1280 x 800
System Software: ℹ️
OS X 10.10 (14A389) - Uptime: 2:49:19
Disk Information: ℹ️
Samsung SSD 840 EVO 500GB disk0 : (500,11 GB)
S.M.A.R.T. Status: Verified
EFI (disk0s1) <not mounted> : 210 MB
Macintosh HD (disk0s2) / [Startup]: 499.25 GB (260.35 GB free)
Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB
MATSHITADVD-R UJ-898
USB Information: ℹ️
Apple Inc. Built-in iSight
Apple Internal Memory Card Reader
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Computer, Inc. IR Receiver
Apple Inc. Apple Internal Keyboard / Trackpad
Configuration files: ℹ️
/etc/sysctl.conf - Exists
/etc/hosts - Count: 15
Gatekeeper: ℹ️
Mac App Store and identified developers
Kernel Extensions: ℹ️
/Applications/IPVanish.app
[not loaded] foo.tap (1.0) Support
[not loaded] foo.tun (1.0) Support
/Applications/LaCie Desktop Manager.app
[not loaded] com.LaCie.ScsiType00 (1.2.13 - SDK 10.5) Support
[not loaded] com.jmicron.driver.jmPeripheralDevice (2.0.4) Support
[not loaded] com.lacie.driver.LaCie_RemoteComms (1.0.1 - SDK 10.5) Support
[not loaded] com.oxsemi.driver.OxsemiDeviceType00 (1.28.13 - SDK 10.5) Support
/Applications/Private Eye.app
[loaded] com.radiosilenceapp.nke.PrivateEye (1 - SDK 10.7) Support
/Library/Application Support/HASP/kexts
[not loaded] com.aladdin.kext.aksfridge (1.0.2) Support
/System/Library/Extensions
[loaded] com.hzsystems.terminus.driver (4) Support
[not loaded] com.nvidia.CUDA (1.1.0) Support
[not loaded] com.roxio.BluRaySupport (1.1.6) Support
[not loaded] com.sony.filesystem.prodisc_fs (2.3.0) Support
[not loaded] com.sony.protocol.prodisc (2.3.0) Support
/Users/[redacted]/Library/Services/ToastIt.service/Contents/MacOS
[not loaded] com.roxio.TDIXController (2.0) Support
Startup Items: ℹ️
CUDA: Path: /System/Library/StartupItems/CUDA
ProTec6b: Path: /Library/StartupItems/ProTec6b
Startup items are obsolete and will not work in future versions of OS X
Launch Agents: ℹ️
[not loaded] com.adobe.AAM.Updater-1.0.plist Support
[running] com.adobe.AdobeCreativeCloud.plist Support
[loaded] com.adobe.CS5ServiceManager.plist Support
[running] com.digitalrebellion.EditmoteListener.plist Support
[loaded] com.google.keystone.agent.plist Support
[loaded] com.intego.backupassistant.agent.plist Support
[running] com.mcafee.menulet.plist Support
[invalid?] com.mcafee.reporter.plist Support
[loaded] com.nvidia.CUDASoftwareUpdate.plist Support
[loaded] com.oracle.java.Java-Updater.plist Support
[running] com.orbicule.WitnessUserAgent.plist Support
[loaded] com.xrite.device.softwareupdate.plist Support
Launch Daemons: ℹ️
[loaded] com.adobe.fpsaud.plist Support
[invalid?] com.adobe.SwitchBoard.plist Support
[running] com.aladdin.aksusbd.plist Support
[failed] com.aladdin.hasplmd.plist Support
[running] com.edb.launchd.postgresql-8.4.plist Support
[loaded] com.google.keystone.daemon.plist Support
[running] com.intego.BackupAssistant.daemon.plist Support
[loaded] com.ipvanish.helper.openvpn.plist Support
[loaded] com.ipvanish.helper.pppd.plist Support
[invalid?] com.mcafee.ssm.ScanFactory.plist Support
[invalid?] com.mcafee.ssm.ScanManager.plist Support
[running] com.mcafee.virusscan.fmpd.plist Support
[loaded] com.mvnordic.mvlicensehelper.offline.plist Support
[loaded] com.oracle.java.Helper-Tool.plist Support
[loaded] com.oracle.java.JavaUpdateHelper.plist Support
[running] com.orbicule.witnessd.plist Support
[loaded] com.radiosilenceapp.nke.PrivateEye.plist Support
[running] com.xrite.device.xrdd.plist Support
User Launch Agents: ℹ️
[loaded] com.adobe.AAM.Updater-1.0.plist Support
[loaded] com.adobe.ARM.[...].plist Support
[invalid?] com.digitalrebellion.SoftwareUpdateAutoCheck.plist Support
[loaded] com.facebook.videochat.[redacted].plist Support
[loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist Support
[loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist Support
[running] com.spotify.webhelper.plist Support
User Login Items: ℹ️
Skype Program (/Applications/Skype.app)
GetBackupAgent Program (/Users/[redacted]/Library/Application Support/BeLight Software/Get Backup 2/GetBackupAgent.app)
PhoneViewHelper Program (/Users/[redacted]/Library/Application Support/PhoneView/PhoneViewHelper.app)
EarthDesk Core UNKNOWN (missing value)
Dropbox Program (/Applications/Dropbox.app)
AdobeResourceSynchronizer ProgramHidden (/Applications/Adobe Reader.app/Contents/Support/AdobeResourceSynchronizer.app)
i1ProfilerTray Program (/Applications/i1Profiler/i1ProfilerTray.app)
Internet Plug-ins: ℹ️
Google Earth Web Plug-in: Version: 6.0 Support
Default Browser: Version: 600 - SDK 10.10
AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 Support
FlashPlayer-10.6: Version: 15.0.0.189 - SDK 10.6 Support
AdobePDFViewerNPAPI: Version: 11.0.09 - SDK 10.6 Support
Silverlight: Version: 5.1.10411.0 - SDK 10.6 Support
Flash Player: Version: 15.0.0.189 - SDK 10.6 Support
QuickTime Plugin: Version: 7.7.3
iPhotoPhotocast: Version: 7.0
SiteAdvisor: Version: 2.0 - SDK 10.1 Support
AdobePDFViewer: Version: 11.0.09 - SDK 10.6 Support
GarminGPSControl: Version: 3.0.1.0 Release - SDK 10.4 Support
JavaAppletPlugin: Version: Java 7 Update 71 Check version
User Internet Plug-ins: ℹ️
Google Earth Web Plug-in: Version: 6.2 Support
F5 Inspection Host Plugin: Version: 6031.2010.0122.1 Support
f5 sam inspection host plugin: Version: 7000.2010.0602.1 Support
Safari Extensions: ℹ️
Facebook Cleaner
Better Facebook
SiteAdvisor
Incognito
Bing Highlights
YouTube5
AdBlock
YoutubeWide
Audio Plug-ins: ℹ️
DVCPROHDAudio: Version: 1.3.2
3rd Party Preference Panes: ℹ️
CUDA Preferences Support
EarthDesk Support
Editmote Support
Flash Player Support
FUSE for OS X (OSXFUSE) Support
Growl Support
Java Support
Witness Support
Time Machine: ℹ️
Time Machine not configured!
Top Processes by CPU: ℹ️
13% taskgated
12% WindowServer
1% WitnessUserAgent
1% sysmond
1% Activity Monitor
Top Processes by Memory: ℹ️
327 MB com.apple.WebKit.WebContent
137 MB softwareupdated
94 MB Safari
82 MB VShieldScanner
82 MB Dock
Virtual Memory Information: ℹ️
65 MB Free RAM
1.58 GB Active RAM
1.54 GB Inactive RAM
647 MB Wired RAM
2.95 GB Page-ins
260 MB Page-outsYou have SCADS of extensions and the things running. McAfee, Intego, Orbicule, CleanMyMac, and others I've not ever even heard of. My first recommendation would be to remove all of these and see if things improve.
-
I updated my TB to the latest version and now when I open it up it asks me to login with my password but it doesn´t accept it.
http://kb.mozillazine.org/Password_rejected
-
Lately I have been getting a rectangular screen titled Login Setting, with my Username and Password and asking me to Login. This screen shows up on opening the computer and has never been seen before the last month or so. It has one box titled Login Credentials with a username and password field and a second box titled Login Status at the bottom where it says "Profile not found" in red. I've never seen this before and ignoring it does not effect any operations. Is this legitimate or some kind of identity fishing?
Hello,
Have you done the recent Security updates?
Is this from Sleep or on bootup?
Timing is about right for the FlashBack attack.
Disable Java in your Browser settings, not JavaScript.
http://support.apple.com/kb/HT5241?viewlocale=en_US
http://support.google.com/chrome/bin/answer.py?hl=en-GB&answer=142064
http://support.mozilla.org/en-US/kb/How%20to%20turn%20off%20Java%20applets
Flashback - Detect and remove the uprising Mac OS X Trojan...
http://www.mac-and-i.net/2012/04/flashback-detect-and-remove-uprising.html
In order to avoid detection, the installer will first look for the presence of some antivirus tools and other utilities that might be present on a power user's system, which according to F-Secure include the following:
/Library/Little Snitch
/Developer/Applications/Xcode.app/Contents/MacOS/Xcode
/Applications/VirusBarrier X6.app
/Applications/iAntiVirus/iAntiVirus.app
/Applications/avast!.app
/Applications/ClamXav.app
/Applications/HTTPScoop.app
/Applications/Packet Peeper.app
If these tools are found, then the malware deletes itself in an attempt to prevent detection by those who have the means and capability to do so. Many malware programs use this behavior, as was seen in others such as the Tsunami malware bot.
http://reviews.cnet.com/8301-13727_7-57410096-263/how-to-remove-the-flashback-ma lware-from-os-x/
http://x704.net/bbs/viewtopic.php?f=8&t=5844&p=70660#p70660
The most current flashback removal instructions are F-Secure's Trojan-Downloader:OSX/Flashback.K.
https://www.securelist.com/en/blog/208193454/Flashfake_Removal_Tool_and_online_c hecking_site
More bad news...
https://www.securelist.com/en/blog/208193467/SabPub_Mac_OS_X_Backdoor_Java_Explo its_Targeted_Attacks_and_Possible_APT_link -
I need to create a SQL LOGIN with weak password.
Is there a way to change the password policy or bypass for a specific LOGIN ?
I've tried this:Is there a way to change the password policy or bypass for a specific LOGIN ?
SQL Azure doesn't allow the CHECK_POLCY clause. See
https://msdn.microsoft.com/en-us/library/ms189751.aspx
Why would you want to create a weak password? I think the CHECK_POLICY option is intended only for legacy applications.
Dan Guzman, SQL Server MVP, http://www.dbdelta.com -
hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,
but i can't find my data which i have saved on mac.the storage is showing data used and free space on the disk
please help me out in this matter.How did you change your user name?
resetpassword wouldn't have done it. If you managed to create a new user, then your data is still in the old account. -
Bought the iPad . Asks for activation, but he is a friend who forgot my login, but remember the password. What to do? I want to completely reset together with his id. How to do this?
AleksandrD wrote:
Bought the iPad . Asks for activation,
The Apple ID and Password that was Originally used to Activate the iDevice is required.
If you cannot get this information from the seller
Removing a device from a previous owner’s account
You need to return the Device for a refund, as you will not be able to re-activate it. -
Yosemite and login with iCloud password
If I change my password on https://appleid.apple.com when it should be usable for login on iMac/MacBook? All my systems see that password got changed and System Preferences->iCloud requests new password after while. However after two days I still have to login with my OLD iCloud password for all my Macs.
I finally logged out from iCloud totally. Login password had to be changed to local one. Then I re-enabled once again iCloud services from System Preferences and as final phase configured login password to use iCloud one. (<-I think I did system restart before configuring password) Now this is working with current password on iCloud. (Hopefully works also in case of changing iCloud password dunno yet)
-
Login attempts with wrong /expired password..Security
Hi,
I need to know dictionary view , which tells which user is trying to login with wrong password.
Actually login history for oracle user account.
please tell procedure or configurations for this.
Thanks in advance.
AjThis is a correct method for OLD versions
See correct value for AUDIT_TRAIL in 10g : http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams016.htm#REFRN10006
From a security point of view, the best is to audit into OS (syslog : http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/auditing.htm#sthref1168)
From a day-by-day point of view, the simplier is to audit into DB (SYS.AU$)
Thoses parameters are not dynamic but you've to modify thoses in spfile, as Oracle recommand using spifile instead of pfile.
svrmgrl no longer exist, you have to do this in sqlplus. -
I loaded what I guess is the new version of Firefox and it completely changed my whole task bar. I don't have my Norton Logins with stored passwords, and it's hard to find my favorites. Help get it back to how it was.
Credit Tony E
To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data. See https://support.mozilla.com/kb/Uninstalling+Firefox
You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles
Maybe you are looking for
-
"mistake" sign when importing AVCHD from camera
Dears! Could anyone advice, what is the solution for the issue: with iMovie 09 I'm trying to import AVCHD films from Sony HDR C11. The program sees the films and even can play them (in import window). The import process starts and continues for the w
-
Hello, I have MSI Z68 GD65 Mainboard and an old VGA only 19 inch TFT monitor. Till now I was using Lucid Virtu technology which is implemented in the mainboard. But now the problem is the Virtu software is outdated and it gives a strange error statin
-
PSE 6 - problem with photos disappearing from Slideshow
Hello, I worked on a slide show recently and then exported it to a .wma file. I returned to the slide show project in Elements a couple of days later to add another slide. Out of the 27 slides only three were intact. In 25 slides, there were no longe
-
I'm trying to fill out the form fields in an applet running in a browser from an independent external application. I have no control over the Applet as it is part of a separate application. I've tried screen hopping with the Robot API but this depend
-
Passing where cluase as parameter for cursor
I want to pass where clause of cursor as parameter.... how can I do that? say I want cursor as, cursor c1 is select fname, mname from person where :param; where :param is a value I want to pass in declare section