Beginner in java and need your help about DES

hello,
I m a new guy in java programming and learn from many books.I m making a website and portal right now and dying need your help about DES.my portal (using java) requires somebody to make a login name and a password.I m done with the server and client things and rite now stuck with this "DES" stuff.
so I make some conditions and algorithm below..
1. when a user login,the password is encrypted.at this point,cleartext(id) and encryption (M,N) are involve.
2. then the key is changed based on algorithm.
3.the key changed by key(id) is received and the original text should be encrypted.
the algorithm
1. the original text x1.x2.x3.x4.x5.x6.x7.x8 (64 bits)
2. encypt the password
a. Each character is changed into an int type by the ASCII code, and let the 1st bit be an odd number parity bit.
b.The 1st bit of the 1st character in (IP) is set to '1', and the 8th bit of the 8th character as '64'.
c.the rest (IP) is like this
1 2 3 4 5 6 7 8
0 # 58 50 42 34 26 18 10 2
8 # 60 52 44 36 28 20 12 4
16 # 62 54 46 38 30 22 14 6
24 # 64 46 48 40 32 24 16 8
32 # 57 49 41 33 25 17 9 1
40 # 59 51 43 35 27 19 11 3
48 # 61 53 45 37 29 21 13 5
56 # 63 55 47 39 31 23 15 7
d. and lastly,from above,,it should be done like this
1 2 3 4 5 6 7
0 # 40 8 48 16 56 24 64 32
8 # 39 7 27 15 55 23 53 31
16 # 38 6 26 14 54 22 52 30
24 # 37 5 25 13 53 21 51 29
32 # 36 4 24 12 52 20 50 28
40 # 35 3 23 11 51 19 49 27
48 # 34 2 21 10 50 18 48 26
56 # 33 1 20 9 49 17 47 25
e. key y1,y2,y3,y4,y5,y6,y7,y8 (64bit)
f. generate the key based on ID
a. Each character is changed into an int type by the ASCII code, and let the 1st bit be an even number parity bit.
b.the process is repeat again.
anybody has an idea to help me with the sample program?
thanks in advance...

just ask about a simple program how to receive a
password from somebody and change it to a key..and
then confirm it with DES.Once again I have a problem understanding what you are asking.
Are you trying to use the password as a key to encrypt some 'standard thing' and place this encrypted value in a database? If so then look in the JCE for 'password based encryption' such as PBEWithMD5AndDes. This seems back to front to me but I can see nothing wrong with the approach since the 'standard thing' you would encrypt is in effect a key. If this is for a commercial application then I would find a security expert to evaluate your proposal!
In my experience it is more normal to encrypt the user's password with DES and store the result in the database. To do this just look in the JCE for DES encryption and consider using DES with CBC and PKCS5 padding. Also, consider encrypting the concatenation of the user's 'user name' with the password as this will (almost certainly) avoid having two encrypted values in the database that are the same even if two users have the same password.
For both of these you might consider using Base64 or Hex to turn you encrpted bytes into ASCII characters before trying to store them in your DB.

Similar Messages

  • I need your help about method for 'Seperating Keypad'

    Hi~ I'm a logic user.
    I used to be a PC version logic platinum user.
    And, I'm moving to Mac OS.
    So, I bought Logic Express.
    I just want to set up 'my style keycommand'.
    Especially, seperating numbers on keyboard and keypad.
    (For example, number 1 on keyboard to 'Screen01' and number 1 on keypad to 'Rewind'.)
    My equipments are is Macbook air and USB keyboard(A1243-109key)
    I bought this extra keyboard for more convenient use at home.
    and, have done all through the Manual.
    Preference < Keycommand < option < preset < US with numeric Keypad selecting (if only 109 key) < Learn by key position & Pressing number 1 on keypad.
    But, doesn't work.
    Only with message like 'already assigned to the Screen01, will you really change?'
    In short, keypad can't be seperated.
    Can you help me?
    1. Do I have to adjust keyboard to Mac before loading Logic?
    2. Is the seperating impossible in case of Macbook + normal Keyboard?
    3. Can you guess what is the problem?
    I need your cooperation~
    Thank you~

    Please post this in Portal forum. This is Reports forum

  • I use windows XP and recently upgraded to FF 6.0 when I click the FF shortcut it attempts to load with the hourglass icon but then stops. 5-8 minuets after it loads. This is obviously frustrating. I love FF and need your help.

    I use windows Xp and FF 6.0 does not load quickly...it takes 5-8...sometimes 15 minuets before it loads.

    Here 5.0 if that is what you want.
    ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/5.0/win32/en-US/
    But I don't what 5 is going to do for you if your having trouble with 6.
    Did you try reading threw [[Basic Troubleshooting]], you should try to see what your issue are rather than go backwards.

  • Philipp Weckerle,I need your help~~about extensions for dreamweaver

    I have installed oc4j and oracle extensions for Macromedia dreamweaver.http://localhost:23791/portalTempalte/portaTemplate can been seen,but there are something error with connection to the DB.
    the portalTemplate.xml like this:
    <?xml version = '1.0' standalone = 'yes'?>
    <portalTemplate>
    <username>portal</username>
    <password>Qvj9I0Kb</password>
    <host>ocsinfra.taiji.com.cn</host>
    <port>1521</port>
    <sid>asdb</sid>
    </portalTemplate>
    what's wrong with it ? Or something eles i will do ?
    Can you send me a mail if you are not busy ? Thanks a lot.
    shang.<[email protected]>

    Please post this in Portal forum. This is Reports forum

  • Lost my iphone 5 and want your help to get it. Have my apple id for 2 devices

    Lost my iphone 5 and need your help please since i downloaded find my iphone and can only locate my ipad

    If Find My iPhone doesn't show a location for the iPhone, then unless your carrier offers some sort of tracking service, there will be no way to locate the phone other than to just look for it. Notify the police in case someone turns it in and change passwords to your Apple ID and any other online services you used from your iPhone.
    Regards.

  • I need Your Help for CAF/EU/GP/API Guided Procedures

    Hi everyone, I need your help about Guided procedures CAF API, I am developing an WEB DYNPRO Callable Object for Guided Procedures, but I need to get the task name of the running proceess on Guided Procedure once time a user initiated it, if is possible? Do you have an examples?
    Thenk you very much

    Hi,
    Yes you can retrieve the task name of the running process. Here is what you need to do.
    1. Get the process instance - IGPRuntimeManager - > getInstance()
    2. Get the IGPActivityInstance(s) from the process instance - processInstance.getChildrenInformation().
    3. Optionaly check if these child activities are Blocks or Actions. If Block drill further to get the Actions using getChildrenInformation().
    4. Retreive the IGPActionInstance(s) from the Block Activities.
    5. Get the IGPActivity object for these Actions using IGPActionInstance.getTemplate() method.
    6.  This object will have a method getTitle() which will retrive you the activity name.
    Hope this helps.
    Thanks
    Kiran

  • Absolue beginner need your help with basics of shell / applescript and xode

    Guys,
    I'm an absolute beginner in both xcode and applescript trying to wrap a few shell commands with some basic graphical elements.
    I will need your help after 2 days of tests and un-successful trials.
    Trying to display "$ifconfig en0" shell results into a text box.
    Here is what I'm doing:
    property networkif : missing value
    property dhcpview : missing value
    set the dhcpview to do shell script "/sbin/ifconfig " & networkif
    I can't have this accepted:
    set contents of text field "hmmm" to "DHCP " & dhcpview
    hmm is the name I have set under Interface Builder to a text box (NSTextView object)
    Xcode compiler returns me an error :
    ToolAppDelegate.applescript:99: error: A “"” can’t go after this identifier. (-2740)
    Command /usr/bin/osacompile failed with exit code 1
    while doing this is absolutely working but on a separate popup window:
    display dialog " Here is your IP address in ALU's network: " & dhcpview
    I have no clue what I'm doing wrong.

    It looks like you are trying to use *AppleScript Studio* syntax in an AppleScriptObjectiveC project - the way you connect the user interface items to your script is different in the new framework. If you are creating a new ASOC project, take a look at MacScripter's entry level tutorial AppleScriptObjC in Xcode for some examples.

  • I'm lost when I try to figure out what exaclty is Java.... I need your help

    Hi, I know that java is OOP, Multiplatform, etc, etc...
    But when I try to look on google for jobs about java or "learn Java" what "Should I know in java"... I always found... whebshpere, oracle, linux, jboss, glassfish, opensolaris, struts, hibernate, spring, eclipse, netbeans, jidea, and so on!!!...
    I'm lost... I will be sincere ...
    I've started thank for a friend in a world of programming with .NET (ASP.NET SQL .NET Silverlight Windows Server) and was good BUT i feel inside that I prefer Java.
    I don't know why but with java I feel free, i think will be a good technology for a long time.
    But some things make my crazy.
    I cant found a fast path or the right path without getting mess. Like I posted above.
    So I need your help, if You are an advance programmer... tell what Should I learn ( essencially ) to get a good job. Oracle + Java ? linux + oracle + java? websphere + java? eclipse or netbeans?? all thouse things are awesome... but I am a HUMAN... I can't learn thouse all things and less in little time.... I just want to have a good preparation for to start to look a job in early time.
    I look forward yours answers.
    Thanks community.

    vidix wrote:
    Hi, I know that java is OOP, Multiplatform, etc, etc...
    So I need your help, if You are an advance programmer... tell what Should I learn ( essencially ) to get a good job. Oracle + Java ? linux + oracle + java? websphere + java? eclipse or netbeans?? all thouse things are awesome.The answer to that depends on what you want to do at work. I know great developers that never have written a single SQL statement, and I'm always trying to stay away from everything that has a web interface :)
    Decide what you want to do at work, and then figure out what technologies you need to know.

  • Some question about 9iAs R1.2.2 & R2, need your help:

    Some question about 9iAs R1.2.2 & R2, need your help:
    Since 2000, we has used 9iAS Core (R1.2.2) to publish our website. The platform is Suns Solaris (SPARC). The database is Oracle 8i. But there are so many questions:
    1.     The Web Cache cant be installed well
    2.     The web pages use JSP to query database with SQL show errors when we refresh the page a few times. The error will disappear after restarting the 9iAS or refreshing the page again. On the other hand, the same pages dont show error on resin. The error is java.sql.SQLException : Closed Connection: next. I supposed that the connection of database has some hidden troubles, but I can find it, could you give me some advice.
    Now I have installed 9iAS R2, But when I visited the manage page, I found that a password is needed to visit the web cache manage page. I dont think I have set the password, and then I cant control the web cache. I want to know is a default password occurred? If not, what is the password.

    The default password for Web Cache is: administrator
    See walkthrough on the sample code page: http://otn.oracle.com/sample_code/products/ias/content.html
    HTH,
    Ashesh Parekh
    Oracle9iAS product management

  • I need your help with a decision to use iPhoto.  I have been a PC user since the mid 1980's and more recently have used ACDSee to manage my photo images and Photoshop to edit them.  I have used ProShow Gold to create slideshows.  I am comfortable with my

    I need your help with a decision to use iPhoto.  I have been a PC user since the mid 1980’s and more recently have used ACDSee to manage my photo images and Photoshop to edit them.  I have used ProShow Gold to create slideshows.  I am comfortable with my own folder and file naming conventions. I currently have over 23,000 images of which around 60% are scans going back 75 years.  Since I keep a copy of the originals, the storage requirements for over 46,000 images is huge.  180GB plus.
    I now have a Macbook Pro and will add an iMac when the new models arrive.  For my photos, I want to stay with Photoshop which also gives me the Bridge.  The only obvious reason to use iPhoto is to take advantage of Faces and the link to iMovie to make slideshows.  What am I missing and is using iPhoto worth the effort?
    If I choose to use iPhoto, I am not certain whether I need to load the originals and the edited versions. I suspect that just the latter is sufficient.  If I set PhotoShop as my external editor, I presume that iPhoto will keep track of all changes moving forward.  However, over 23,000 images in iPhoto makes me twitchy and they are appear hidden within iPhoto.  In the past, I have experienced syncing problems with, and database errors in, large databases.  If I break up the images into a number of projects, I loose the value of Faces reaching back over time.
    Some guidance and insight would be appreciated.  I have a number of Faces questions which I will save for later. 

    Bridge and Photoshop is a common file-based management system. (Not sure why you'd have used ACDSEE as well as Bridge.) In any event, it's on the way out. You won't be using it in 5 years time.
    Up to this the lack of processing power on your computer left no choice but to organise this way. But file based organisation is as sensible as organising a Shoe Warehouse based on the colour of the boxes. It's also ultimately data-destructive.
    Modern systems are Database driven. Files are managed, Images imported, virtual versions, lossless processing and unlimited editing are the way forward.
    For a Photographer Photoshop is overkill. It's an enormously powerful app, a staple of the Graphic Designers' trade. A Photographer uses maybe 15% to 20% of its capability.
    Apps like iPhoto, Lightroom, Aperture are the way forward - for photographers. There's the 20% of Photoshop that shooters actually use, coupled with management and lossless processing. Pop over to the Aperture or Lightroom forums (on the Adobe site) and one comment shows up over and over again... "Since I started using Aperture/ Lightroom I hardly ever use Photoshop any more..." and if there is a job that these apps can do, then the (much) cheaper Elements will do it.
    The change is not easy though, especially if you have a long-standing and well thought out filing system of your own. The first thing I would strongly advise is that you experiment before making any decisions. So I would create a Library, import 300 or 400 shots and play. You might as well do this in iPhoto to begin with - though if you’re a serious hobbyist or a Pro then you'll find yourself looking further afield pretty soon. iPhoto is good for the family snapper, taking shots at birthdays and sharing them with friends and family.
    Next: If you're going to successfully use these apps you need to make a leap: Your files are not your Photos.
    The illustration I use is as follows: In my iTunes Library I have a file called 'Let_it_Be_The_Beatles.mp3'. So what is that, exactly? It's not the song. The Beatles never wrote an mp3. They wrote a tune and lyrics. They recorded it and a copy of that recording is stored in the mp3 file. So the file is just a container for the recording. That container is designed in a specific way attuned to the characteristics and requirements of the data. Hence, mp3.
    Similarly, that Jpeg is not your photo, it's a container designed to hold that kind of data. iPhoto is all about the data and not about the container. So, regardless of where you choose to store the file, iPhoto will manage the photo, edit the photo, add metadata to the Photo but never touch the file. If you choose to export - unless you specifically choose to export the original - iPhoto will export the Photo into a new container - a new file containing the photo.
    When you process an image in iPhoto the file is never touched, instead your decisions are recorded in the database. When you view the image then the Master is presented with these decisions applied to it. That's why it's lossless. You can also have multiple versions and waste no disk space because they are all just listings in the database.
    These apps replace the Finder (File Browser) for managing your Photos. They become the Go-To app for anything to do with your photos. They replace Bridge too as they become a front-end for Photoshop.
    So, want to use a photo for something - Export it. Choose the format, size and quality you want and there it is. If you're emailing, uploading to websites then these apps have a "good enough for most things" version called the Preview - this will be missing some metadata.
    So it's a big change from a file-based to Photo-based management, from editing files to processing Photos and it's worth thinking it through before you decide.

  • Hi, my iphone its in recovery mode and when i restore my iphone 5s loading show the blue screen and show note on itunes (unknown error 14) please i need your help please . thanks

    Hi, my iphone its in recovery mode and when i restore my iphone 5s loading show the blue screen and show note on itunes (unknown error 14) please i need your help please . thanks

    In the article Resolve iOS update and restore errors this is what it says about error 14:
    Check your USB connections
    Related errors: 13, 14, 1600, 1601, 1602, 1603, 1604, 1611, 1643-1650, 2000, 2001, 2002, 2005, 2006, 2009, 4005, 4013, 4014, or “invalid response."
    If the USB connection between your device and computer is interrupted, you may be unable to update or restore.
    To narrow down the issue, you can also change up your hardware:
    Use the USB cable that came with your device, or a different Apple USB cable.
    Plug your cable into a different USB port directly on your computer. Don't plug it into your keyboard.
    Try a different computer.
    If necessary, resolve any further issues with the USB connection, then with your security software.
    If you're still seeing the error message, check for hardware issues by following the next section.

  • Hello i need a help about script to export translatable text strings from ai files and import them back

    Hello i need a help about script to export translatable text strings from ai files and import them back after editing, thanks in advance

    Lanny -
    Thank you for taking the time to help with this problem. Can I just say however that as someone who has posted a first comment here and quite clearly never used a forum like this before, your comment unfortunately comes across as very excluding. It makes me feel there are a set of unwritten rules that I should know, and that I don't know them shows that the forum is not for me. In short, it's exactly the kind of response that stops people like me using forums like this.
    I'm sure it's not intended to be received like this and I am sure that the way you have responded is quite normal in the rules of a forum like this. However, it is not normal for those of us who aren't familiar with forums and who only encounter them when they have a genuine problem. This is why I hope it is helpful to respond in full.
    The reason I posted here is as follows. I was directed here by the apple support website. The original comment seemed to be the only one I could find which referred to my issue. As there is no obvious guidance on how to post on a forum like this it seemed perfectly reasonable to try and join in a conversation which might solve more than one problem at once.
    Bee's reply however is both helpful and warm. This could in fact be a template for how new members should be welcomed and inducted into the rules of the forum in a friendly and inclusive way. Thank you very much indeed Bee!

  • HT201210 please,I need your help ! I was updating my iphone ios to ios4.2 and then problems begins when it shows that it needs to restore the factory software to I was trying to restore ,but that didn't happen it begins but then it shows unknown error 101

    please,I need your help ! I was updating my iphone ios to ios4.2 and then problems begins when it shows that it needs to restore the factory software to I was trying to restore ,but that didn't happen it begins restoring but then it shows unknown error 1015

    Stop being impatient.
    From the article that the question was posted from:
    Errors related to downgrading iOS
    The required resource cannot be found: This alert message occurs when your device has a newer version of iOS than what is available in iTunes. When troubleshooting a device that presents this alert message, go to Settings > General > About and check the version of iOS on the device. If it is newer than the latest released iOS version, the device may have a prerelease developer version of iOS installed.   Installing an older version of iOS over a newer version is not supported.
    Error 1015: This error is typically caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple. This error can also occur when an unauthorized modification of the iOS has occurred and you are now trying to restore to an authorized, default state.
    You cannot downgrade.
    If you have a 3GS, you can only install iOS 6.1.3 which is the current version of iOS for the device.

  • I need your help and opinion on JNI

    I am assigned a task to build one Java API above one existing protocol stack written in legacy C++, which involves UDP and TCP communication.
    The C++ code involves callback method.
    My qustion is:
    1. I only tried some simple examples on one way trasfering, for example, invoke c++ from Java (HelloWorld example), and either invoke Java from C++. Is it possible to do it all together? I mean invoke C++ from Java and invoke Java from C++ for the callback methods at the same time?
    2. Is it possible to do this with JNI? I doubt because it involves callback method in C++ code, so in Java, a interface should be created with the callback method declared inside it.
    I really need your help!

    1. Yes it is possible to call out of java into C, and back into java from C. And the tool of choice is JNI.
    2. You better buy a JNI book.
    3. As you get into it, you will probably find that designing around threading issues become important. Scan this forum.

  • HT201359 Hi I need your help, I am civil engineer and recently I bought an app

    Hi I need your help, I am civil engineer and recently I bought an app call "sewer pipe design" . After I installed it in my iphone I found that developer is cheating people.
    In order to design a sewer pipes we need to know manning coefficient commonly known as roughest. second to design a sewer pipe we don't use minimum tractive force bc is this a parameter for designing open channel on the ground/earth. i f the sewer is a prression with use another principles like loss head and Hassen William formule. So this developer is cheating apple customers.
    I have already complain with apple support but they only asked me to fill another complain I did it, also they told me that asked a refund but  i don find any link for doing this. what can I do??
    <Email Edited By Host>

    You don't say how you contacted them, so I don't know if this is what you used. You can try the 'report a problem' link from your purchase history : log into your account on your computer's iTunes via Store > View My Account (Store > View My Apple ID on iTunes 11) and you should then see a Purchase History section with a 'see all' link to the right of it ; click on that and you should see a list of your purchases ; find that app and use the 'Report a Problem' link and fill in details about the problem (iTunes support should reply within, I think, about 24 hours).
    Some people have had a problem with the 'report a problem' link (it's been taking people to this site on a browser instead of showing a form in iTunes) - if it does that to you then try contacting iTunes support via this page : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption.
    As these are user-to-user forums I've asked the hosts to remove your email address from your post.

Maybe you are looking for