How do I generate a TripleDES key from the user's password?

Is there any standard way to generate a Key (for TripleDES for example) using a user provided password? I want to store encripted data and I see TripleDes key has to be 24 bytes long, so how do I generate it consistently and safely from the user provided password?
I know how to actually build a key with the keyfactory, I'm talking about the aproach to generate good keys from a user entered string. It can't be random keys since I have to store those encripted files and restore them later.

Is there any standard way to generate a Key (for
TripleDES for example) using a user provided
password? I want to store encripted data and I see
TripleDes key has to be 24 bytes long, so how do I
generate it consistently and safely from the user
provided password?
I know how to actually build a key with the
keyfactory, I'm talking about the aproach to generate
good keys from a user entered string. It can't be
random keys since I have to store those encripted
files and restore them later.Hi , i�m having the same problem, i was wondering if yoy found any solution so far.
I�ve tried this
SecretKey symmetricKey = SecretKeyFactory.getInstance("DESede").generateSecret(new PBEKeySpec("mypassword".toCharArray()));But it returns java.security.spec.InvalidKeySpecException: Inappropriate key specification
I have also tried to this:
SecretKey symmetricKey = SecretKeyFactory.getInstance("PBEWithMD5AndTripleDES").generateSecret(new PBEKeySpec(password.toCharArray()));But it results on different byte arrays whenever i try to do the encrypting, i mean it allways returns different encryptatios. I suposed it could be becaus it�s using some kind of random, and i need to have always a specific result.

Similar Messages

  • Is there a method of deleting the developer key from the user?

    Is there a method of deleting the developer key from the user?
    Please help me.

    Hi Matt,
    Could you explain from which table should be deleted..?
    Thanks.
    Regards,
    Ramses Hutahaean

  • How do I delete a Pages file from the Users directory?

    Browsing my new MacBook I've spotted that a version of one of my earliest Pages docs is stored directly in the Users directory. There is no option in Finder to delete it. I can drag a copy elsewhere, but I want to get rid of it completely. How do I achieve this?
    Thanks.

    Hi Andrew,
    You need to go to your Users Library...
    users/yourname/library/application support/iwork/pages/templates/my templates
    If using Lion... in Finder, hold down the Option key while clicking on the Go menu and your users Library will appear...

  • How do I convert ip that comes from the user in String as an argument to...

    InetAddress style?
    Thanks,
    Amir

    Depending on the format that your user types in, you could use InetAddress.getByName(userInput)
    Good Luck
    Lee

  • How I could generate an XML file from a report in version 4.0B

    Good morning,
    How could I generate an XML file from a report? Please note that I am using version 4.0B
    I don't have access to
    Billy Vital

    Hi,
            In the Class CL_XML_DOCUMENT,
                 we have a method  EXPORT_TO_FILE to download an XML file.

  • How to install Vista using product key from bottom of Satellite P200?

    Hello all,
    I recently had to replace my HDD as my P200 had a fatal error, corrupting all data on the old HDD. I have no recovery discs at all, (None were supplied), and wondered how i am supposed to re-install Vista using my product key from the bottom of the laptop? Can anybody give any kind of assistance please?
    As i have been reading other related threads i get the impression that i need to approach Toshiba and buy a recovery CD, at my expense. Is this correct?
    Thanks
    Lee

    Hi
    As far as I know the serial key which is placed at the bottom of the unit would not work with other Vista versions! the key belongs to the OEM Vista version preinstalled by Toshiba.
    As mentioned by Jeka, you will need to order an recovery disk or will need to use an clean Vista CD with an own serial key purchased previously.
    Greets

  • How to retrive Exchange product key from the Installed Exchange Servers

    How do I retrieve the Product key from an existing installed exchange servers.

    Right. Think of the security implications if you could just grab the key from the software itself.
    Do any software products allow that?
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • How do I erase my activation key from elements 9?

    How do I erase my activation key from another computer.  The option does not show up on the Help menu?

    Editor>help>deactivate. Doesn't work in organizer.

  • How do I remove an old file from the Finder Favorites list?

    Good Afternoon.
    I have a shiney new MBPro with 10.7.1.
    On my old machine running Snow Leopard, I had two .xls files I used often that I had dragged to the left side into the favorites. The truth is, I hadn't used them in months, but hadn't bothered to remove them. Then about ten days ago, the Bad Thing happened, and I had to replace my laptop rather suddenly. The nice folks at the Apple store transferred all the data and I was off an running in just a few hours.
    Now, I thought to myself, I should remove those two files since I don't use them any more. But how?
    If I click on them nothing happens. If I right-click on them, nothing happens. I can't drag them out because they don't drag and they aren't listed on the list of favorites that can be toggled on and off in preferences.
    I checked. The files did still exist but deleting them didn't remove their names from the favorites list.
    Any suggestions as to how to remove these two .xls files from the Finder's Favorites list?
    Thanks. A picture is below.

    The msot amazing person ,just posted an answer to my other question which worked here too.
    Three cheers for Kappy!
    Just hold down the CMD key and drag them off. How simple is that?? They didn't klnow this at the Genius bar when I asked this morning. I am amazed.
    I wish I knew how to send Kappy cookies.
    Thank you Kappy.

  • HT1766 HOW CAN I CHANGE MY BACKUP FOLDER FROM THE C DRIVE TO ANOTHER?????

    HOW CAN I CHANGE MY BACKUP FOLDER FROM THE C DRIVE TO ANOTHER????? because my c drive in the windows computer gets filled and i need to back up my ipod to a portable hard disk.. bt i dont know how to do it.. plz help

    you can't change the backup folder as far as I know, but you can choose to move backups. The information you need can be found in this article: http://support.apple.com/kb/ht4946
    Where iTunes backups are stored on your computer
    The folder where your backup data are stored varies depending on the computer's operating system.   Make sure the backup folder is included in your periodic data-backup routine.
    iTunes places the backup files in the following places:
    Mac:  ~/Library/Application Support/MobileSync/Backup/
    Windows XP:  \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Note: To quickly access the Application Data folder, click Start, and choose Run. Type %appdata% and click OK.
    Windows Vista and Windows 7:  \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    Note: To quickly access the AppData folder, click Start. In the search bar, type %appdata% and press the Return key.
    Hope this helps
    Regards,
    Stijn

  • Choose the key from the allowed namespace

    Hi All,
    I am using SAP HR practice system and I am getting this error "Choose the key from the allowed namespace" while trying to Define Generation rules for Quota type selection in Time Management.
    Error message as below; Can some one please guide me how to resolve this.
    I also tried saving without clicking on save or green button but by pressing enter nothing worked.
    Choose the key from the allowed namespace
    Message no. SV019
    Diagnosis
    You have attempted to create an entry and have used a key which is not in your namespace.
    This can cause problems in later upgrades because the entry could be overwritten by an import, or overwrite an existing entry.
    Procedure
    Check your entry and try to enter a key value from your namespace.
    You can display the namespace definition with RDDKOR54.
    If you must use the key entered, document your change so that it can be repeated after an upgrade or release change if necessary. If you put the data in a change request, you can export it before an upgrade or release change, and import it again afterwards.
    Best Regards
    Raskii

    Raskii,
    When you are trying to clear a warning message in SAP, press enter. That's not intuitive. The natural tendency is to continue to press save.
    So the sequence of events is:
    - change the data
    - press the save button
    - receive a warning error message
    - press enter, and continue to press enter until you are notified that the change has been saved
    This will work if it's truly a warning message.
    Regards,
    Howard

  • How do I remove an old username from the app store when using the update function

    How do I remove an old username from the app store when using the update function.
    I purchased my Mac used.  The former owners username prepopulates when I try to perform the updated function on the app store.  It does not allow me to use a different user name.    I have created my own username and password.  I have even been able to purchase items from the app store, it's just when I use the update function it does populate with my username.  Any help is appreciated.

    The first thing to do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. You — not the previous owner — must do that. How you do it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    1. You don't own another Mac.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller — not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. Preferably, install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. For early MBA models, you may need a USB optical drive or Remote Disc. You should have received the media from the previous owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc or a flash drive, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    2. You do own another Mac.
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to create a bootable USB device and boot the new Mac from it by holding down the C key at the startup chime. Alternatively, if you have a Time Machine backup of OS X 10.7.3 or later on an external hard drive (not a Time Capsule or other network device), you can boot from that by holding down the option key and selecting it from the row of icons that appears. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    Once booted in Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive.
    After partitioning, quit Disk Utility and run the OS X Installer. You will need the Apple ID and password that you used to upgrade. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    Then run Software Update and install all available system updates from Apple. To upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.
    If the previous owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Apple customer service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it immediately under your ID. In that case, you'll either have to wait up to 90 days or contact iTunes Support.

  • How do i eject a cd rom from the drive...?

    Hello All!
    How do i eject a cd-rom from the the optical drive when the icon doesn't appear on the desktop? Its just spinning and vibrating.
    When I try shutting down the mini, everything happens correctly but the drive just spins and doesn't finish... So I had to unplug the unit. Still nothing...
    I am the new owner of a refurbished mid-2010 MACmini.
    The disc was an old cd-rom from 2003 with a label. I guess I won't do that again.
    HELP!

    Hello All,
    I tried several sugestions I read else where and this is what worked for me:
    Reboot while holding down option key. Shifted to restore disc and tried to eject from disc utility, but no luck. I went to apple and shutdown except that with the drive spinning it wouldn't complet the task. So I unplugged & restarted while holding down the mouse key. The drive grumbled and spit out the disc! Yay!!! I threw said cd-rom across the room!
    I hope that I haven't hurt my new baby mini!
    Thanks for all your previous posts. They gave me something to try instead of pulling my hair out!
    Kudos to you all!!!

  • How to find out web-inf path from the physical drive?

    How to find out web-inf path from the physical drive?
    I have some user profiles in web-inf directory.SO I want to know the path from root directory like
    d:/program files/allaire/jrun/appname/web-inf/profiles/username like that.
    Presently I am able to get the path upto the application directory and from that I am concatinationg web-inf/profiles/username .
    But it is giving problems when it is deployed under unix or linux.Because web-inf there it treats as WEB_INF
    SO I want to get the path of web-inf directory with out hard coding.
    Thanku

    String path = application.getRealPath("/WEB-INF/profiles/username");
    Note sure why you need this, but you don't need the real path to read the file - you can get an InputStream using the relative path. See ServletContext getResource() and getResourceAsStream().

  • How to get a formula from the user from a text box in a webpage

    Hi. I would like to know how to get the formula from the user who enters in a textbox. This formula can have any number of variables starting with a and goes on.
    The complexity of the formula can go upto sin, cos, ln, exp. Also user enters the minimum and maximum values of these variables. Based on a specific algorithm (which I use) I would calculate a *set of values, say 10, for each of these variables, substitute in the formula and based on the result of this formula, I select ONE suitable  value for each of the variables.
    I don't know how to get this formula (which most likely to be different each time) and substitute the values *which I found earlier.
    Kindly help me out in this issue.
    Thanks

    The textbox is the easy part. It's no different than getting a String parameter out of an HTTP request.
    The hard part is parsing the String into a "formula" for evaluation. You'll have to write a parser or find one.
    Google for "Java math expression parser" and see what you get.
    Or write your own with JavaCC.
    %

Maybe you are looking for

  • Reciever port blank in control record of idoc.

    Hi, I am sending IDOC from  client 110 to 220 in R/3. In Client 220 reciever port is blank in control record of Idoc.Do I need to do some kind of settings for this. Any help appericiated. Thanx. Rekha.

  • Lightroom 5.7 slide show crashing

    I just moved Lightroom 5.7 to an I mac retina.  Overtime I try to use the slide show module, it preps the slide show, then crashes once it begins the show.  It was working well on my old iMac 27 in.  Any suggestions?  Running latest Yosemite operatin

  • Problem while Integrating workflow with OID.

    Hi I have a problem with integrating workflow with OID.I must execute the wf_ldap.synch_all() but I couldn't find WF_LDAP package body in the database.There is only package specification.How I can restore the wf_ldap package. Thanks for help..

  • UDF update field using Query

    Hi All, I have a udf field in OITM which we use to flag whether an item is obsolete or not, so Y or N is populated in all item records. I am trying to copy this field and its contents to be displayed in the Stock Data Tab (OITW) using a UDF but canno

  • Can photoshop open .jpg file in camera raw?

    Can photoshop open .jpg file in camera raw?