Having Trouble Correctly Encrypting Email Addresses Using DES

Hi, I am having some problems when I try to encrypt email addresses using DES encryption. I can't really find a solution to the problem. Any help would be appreciated.
//String Encryptor. Takes a string and returns it's equivalent DES encryption.
    private String encrypter(String str)
        try
            byte[] word = str.getBytes("UTF8");
            byte[] encryptedString = this.encrypt.doFinal(word);
            return new String(encryptedString);
        catch(Exception e)
            e.printStackTrace();
        return null;
//String decryptor: Takes an encrypted string and returns its equivalent DES decrypted string
    private String decrypter(String str)
        try
            byte[] encryptedString = str.getBytes();
            byte[] word = this.decrypt.doFinal(encryptedString);
            return new String(word);
        catch (Exception e)
            e.printStackTrace();
        return null;
        }This is a simple input and output:
Input: [email protected]
Out: ‰Qœnõœ £¥Å¼ˆ'v(úR»ñ]{&õa?´n±                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

You don't say what your problem is but this code is an example of the number 1 problem reported in this forum. String is not a suitable container for binary data and encrypted data returned by          byte[] encryptedString = this.encrypt.doFinal(word);
  is definitely binary data and should not be converted to a String using new String(encryptedString);The basic problem is that for the majority of character encodings the transformation
bytes -> String  -> bytesdoes not produced the original bytes.

Similar Messages

  • Having trouble changing my email address used for discussions subscriptions

    The address for replies to threads I've started is an old address. I can access it, but it's a lot of trouble to do so.
    I've tried to change this address to another, more convenient one, but the change doesn't take. It's been a couple of hours since I first tried.
    Both times I've clicked on the save changes button, but the change hasn't been made.
    Help, please.

    Try removing the Apple cookies in your browser, make the change again, hit save and see if that works.

  • I am having trouble loading an email address onto my iPad.

    I am having trouble loading an email address onto my iPad.
    <Personal Information Edited by Host>

    We are fellow users here on these public forums, I've asked the hosts to remove your phone number and email address from your post - it's not a good idea to post personal info on any public forum.
    If you are trying to add an email account to the Mail app then you should be able to so via Settings > Mail, Contacts, Calendars, and on the right-hand side of that screen there should be an 'Add Account' button. Tap that, select the type/provider of the account, and fill in its details - you might then just need to fill in your name, your email address, the account's password, and a description.
    There is some help on this page (the screenshots are from an iPhone, but the principle is the same) : http://support.apple.com/kb/ht4810

  • I am having trouble sending bulk emails (less than 100 at a time) on my gmail account using group names created from my address book.  I use Mail on my I-Mac.  When I try to send out a bulk email, the message shows up that my server can't send them, etc.

    I am having trouble sending bulk emails from a Mail Group (less than 100 at a time) on my gmail account.  They come back saying the server can't recognize the data and try again with selected server or try later or edit message, all of which I have attempted a number of times, including re-booting the computer.  I am wondering if there is something wrong in my Address Book?  I have check Apple Preferences, and Mail Preferences and all seems in order.  I can send to any of the individual addresses, but not in a group.
    Thanks for your help.

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • I have been having trouble getting my email on my iPad. It started when I brought it to the US on vacation (I live in London and my email provider is Virgin Media). It worked once since I returned, but that is it. I can send emails, but can't get them

    I have been having trouble getting my email on my iPad2.
    It started when I brought it to the US on vacation (I live in London and my email provider is Virgin Media). It worked once since I returned, but that is it.
    I can send emails, but can't get them.
    Any ideas, people?

    Hi Kharels
    Just posted this reply to 2 others with same sort of question:
    I have the same issue as i have my own email address and only want to use.
    There are two ways around this annoying problem. The first is to set up your own domain email account alongside your iCloud one, and when you go to send each email tap on From and you get a choice of emails addresses to reply from... ie your own domain or the iCloud one.  This is tedious though.
    The other is to set up your iCloud email as normal, then create a new one altogether. Choose 'Other' when creating this new account. Then put for the incoming server mail.me.com, along with your user name and password. For the outgoing server put the server you want to use - ie your own domain one. This is therefore a hybrid account and does work.
    Now switch off the email for iCloud (leaving on Calendar, Address Book etc). Switch on the email for your hybrid account (which of course is iCloud incoming as well).
    Providing you have directed your own domain email address to your me.com one, you will find the iPhone should behave itself and you can use the folders etc and these will synch with your Mac ok.
    Hope this work for you - let us know.
    Simon

  • Tried to Change my Apple ID email - but it tells me it's my rescue email address, despite having deleted that rescue email address. What in the world can I do?

    Hello all!
    I'm in a bit of a quandary. I have three email addresses, and I'm TRYING to pare down the number of addresses that I use. Thus, I am trying to change my Appple ID to one of those email addresses. Having said that, I tried to Change my Apple ID (which is an email address - one of the ones that I need to get rid of) to one email address that I constantly use. However, the screen tells me that the new address I wish to use, is my rescue email address, despite having deleted that rescue email address. What in the world can I do? I'm about sick and tired of Apple ID's.

    Ok I'm goin to call your old Apple ID #1 your new email you want to use #2 and another email #3.
    - go to http://appleid.apple.com
    - select manage your apple id
    - sign into #2
    - edit primary email and change it to #3
    - save changes and sign out
    Now
    - sign into #1
    - edit primary
    - change it to the email that was used for #2
    - save changes
    - check #2's email inbox for verification email
    - verify account
    If done correctly you should be fine, also in terms of #3 that would be an email you have that you dont mind being an apple id that you wont use. Sorry for the funny way of explaining just thought it would be shorter to type out lol.
    Note: Once changes have been made you must sign out of features such as iCloud, iMessage, FaceTime, iTunes & App Store as they will still display the old Apple ID. Sign in with new email but same password as normal.

  • Since i reinstalled OSX i am having trouble downloading my email attachments

    since i reinstalled OSX i am having trouble downloading my email attachments. I have updated the system.

    I am using a new Apple TV streaming box. I cannot seem to get any itunes movies to completely download. If they do completely download, it often takes a day or more. Even when the download is apparently completed, ATV will often re-authorize the movie purchase...and the download process begins again. That is about the time I send emails and get refunds. NETFLIZ works beaitifully - fast, easy to use, NEVER a problem. I use a MAC, iPad too but have not synced either with ATV.
    Am I doing something wrong? This is incredibly frustrating for my family!!!!

  • I am having trouble getting my emails on my mac in the last 2 weeks after being away

    i am having trouble getting my emails on my mac only and getting the following message - The MobileMe IMAP server “mail.me.com” rejected the password for user . i have used my password on ipad/iphone and me.com website and all is fine .

    Refer to these articles:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/TS1363
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538

  • How can I change the email address used to authorize my computer?

    I borrowed ebooks from a public library using a different email address which I should have used to authorized my computer hosting the adobe digital edition. Is there a way to modify the email address used to authorize my computer as I get an error message when I try to return the books. Thanks

    This says it was assumed answered but where is the answer?  I've gone thru the Help processes to do this but it doesn't change.  The old address is still there.  I have trouble returning books to the library and getting new books.

  • HT5538 what if the phone is having a problem verifying email address for FaceTime?

    what if the phone is having a problem verifying email address for FaceTime?

    Hey miles r.
    Thanks for the question. I understand that you are experiencing issues with FaceTime. The following resources may provide a solution:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime or iMessage is "Unable to verify email because it is in use"
    http://support.apple.com/kb/ts3510
    Apple ID: Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/HE68
    Thanks,
    Matt M.

  • I am having trouble logoin  when i am using muse to upload ftp host and its saying invalid login or

    i am having trouble logoin  when i am using muse to upload ftp host and its saying invalid login or password using different hosting provider?

    Hi!
    I'm having the same problem, and the login and password is 100% correct.
    The FTP is propely configured, but Muse are having problem with it. I can login throught a FTP session from a terminal session, and it also works perfectly with FileZilla or another FTP-client.
    I have made some traces througth Wireshark, and it's clear the Muse made a sucessful login. But, fter the login Muse sends a request for UTF8 and gets an answer from the FTP-server that UTF8 is always enabled, and there is no need to send this command. Then Muse sends a TCP ACK, and the packet after Muse sends FIN, ACK. See a snip from the trace below...
    220-/**********************************************************
    220-*
    220-* This is the FTP server of ############.
    220-*
    220-***********************************************************/
    220-
    220----------------------- Begin Notice ------------------------------
    220--
    220-- Be aware that all traffic are logged and unauthorized
    220-- login attempts will result in permanent banning.
    220--
    220 ------------------------ End Notice ------------------------------
    USER ##########
    331 Password required for ##########
    PASS ########
    230 Logged on
    OPTS UTF8 ON
    202 UTF8 mode is always enabled. No need to send this command.
    Muse -> [ACK]
    Muse -> [FIN][ACK]
    FTP-Server <- [ACK]
    FTP-Server <- [FIN][ACK]
    This means that Muse disconnects AFTER a sucessful login, but give the user a faulty message saying "Invalid login or password" and not that Muse has disconnected because of another reason.
    Looking forward for an answer.
    Best regards
    //Leffe

  • I am having trouble with the email that is confirming my security questions, it says it has sent it to my gmail but i have checked the email account and nothing has been sent, i have waited 24 hours for it and still nothing

    i am having trouble with the email that is confirming my security questions, it says it has sent it to my gmail but i have checked the email account and nothing has been sent, i have waited 24 hours for it and still nothing.

    Hi Cara154,
    If you are having issues receiving the email verification for your security questions, you may find the following article helpful:
    When you provide a rescue email address during Apple ID creation, you will receive an email from Apple to verify that the email address provided is accurate. If you don't see an email from Apple asking you to verify your rescue email address, you may want to check your SPAM folder. If you still haven't received the email from Apple, you can sign in to My Apple ID (appleid.apple.com) to resend your rescue email address. To resend your verification email, click on Password & Security. Then, click the Resend link located in the Rescue Email Address section.
    Apple Support: Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/ht5312
    Regards,
    - Brenden

  • I am having trouble sending an email from mail on my macbook pro. It keeps requesting my password. What should I do?

    I am having trouble sending an email from mail on my macbook pro. It keeps requesting my password. What should I do?

    There seems to be a few bugs with iCloud Mail at times, so send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback
    Apple support article, but I don't think it really addresses your problem.
    iCloud - Mail Troubleshooting

  • Hello, I used to in the old firefox synchronized without an email address, using the id

    Hello, I used to in the old firefox synchronized without an email address, using the id, so now it is impossible, how can sinhronizirovatsya having the id, password and Sync Key?

    Hello,
    Provided you are running the latest version of Firefox on all of your devices and computers, you can sign in with a Firefox account . All you need is an email and password, the sync key is no longer required. Simply click on the menu button (3 bars) and click '''Sign in to Sync'''. If you don't already have one, you can create a Firefox account on that page. To add additional devices, log in with the account you just created.
    Note: If you don't see Sign in to Sync, you are signed in with your old account and need to follow the steps in [[How to update to the new Firefox Sync]].
    See:
    * [[How do I set up Firefox Sync?]]

  • I am having trouble locating past emails through searches, any suggestions ?

    I am having trouble locating past emails through search on my ipad2 , any suggestions ?

    A couple of suggestions.
    Go to settings, and take a look at how many mesages you are set for.  When you get that number, the pad will start deleting older messages as new ones arrive.
    If you are using a pop account, the older messages will still be on your main computer, if you have not deleted them.  Look there.
    If you are on an i map account, set up some subfolders for your key items.  I believe that storage is permanant and is more easily searchable.

Maybe you are looking for