DES Alg problme

hi
i am trying to run small Piece of Code my code is private static String algorithm = "DES";
     private static Key key = null;
     private static Cipher cipher = null;
     private static void setUp() throws Exception {
       key = KeyGenerator.getInstance(algorithm).generateKey();
       cipher = Cipher.getInstance(algorithm);
     public static void main(String[] args)
        throws Exception {
         setUp();
}its giving Exception
java.security.NoSuchAlgorithmException: Algorithm DES not available
     at javax.crypto.SunJCE_b.a(DashoA6275)
     at javax.crypto.KeyGenerator.getInstance(DashoA6275)
     at com.tb.test.LocalEncrypter.setUp(LocalEncrypter.java:31)
     at com.tb.test.LocalEncrypter.main(LocalEncrypter.java:37)what is Problem and how to resolve it
Regards
Nilesh Mishra

Normally I would be happy to help you, but after several years of trying to help here, I've decided not to contribute anymore because of the piss-poor way in which this site is being administered.
Others are still helping, but more may leave if things don't improve. May I recommend devshed or javaranch?
http://www.devshed.com/
http://www.javaranch.com/
If you would like to complain to the admins of this forum, either click the "Report Abuse" link or the "Feedback" link.
-- foofoo (shamelessly stolen the text from jverd).

Similar Messages

  • Initialising Cipher- No Alg params exception

    Hi guys.
    I am trying to encrypt some data with the secret key and then.. send the secret key & encrypted data across ..(dont worry the secret key is sent securely using PKI ;-)) . Then i recreate the secret key and use it to decrypt the data. I was successful in recreating the secret key. but while initialising the cipher (to decrypt mode) using the reconstructed secret key, it throws exception like this:
    java.lang.IllegalArgumentException: no IV set when one expected
    at org.bouncycastle.jce.provider.JCEBlockCipher.engineInit(JCEBlockCipher.java:437)
    at javax.crypto.Cipher.init(DashoA6275)
    I then got the algorithm params from the earlier cipher and then sent them across too.. and this works properly !!! Can u please tell me whether it is right to do it this way.Can we do it in any other way without sending the alg parameters ?? something like.. can the parameters be generated at the other side..just guessing ;)
    //Encrypt
    Cipher scipher= Cipher.getInstance("DES/CBC/PKCS5Padding");
    scipher.init(Cipher.ENCRYPT_MODE,secretKey);
    encrypted= scipher.doFinal("data".getBytes());
    System.out.println("after encrypting the data with the secret key : "+new String(encrypted));
    AlgorithmParameters ap= scipher.getParameters();
    //Decrypt
    Cipher dcipher= Cipher.getInstance("DES/CBC/PKCS5Padding");
    dcipher.init(Cipher.DECRYPT_MODE,reconstructedSecretKey);//HERE I GET THE EXCEPTION
    decrypt= dcipher.doFinal(encrypted);
    System.out.println("after decrypting with the secret key the data is: "+new String(decrypt));
    Thanks in advance,
    Vijay.

    Thanks a LOT Grant . I tried it out and it works
    well!!:-)). Glad I could help.
    I would like to know more about
    IVParameters and also about different modes (CFB/ OFB
    /CFB8/OFB32/ OAEP and others)and the padding schemes
    to be used with them. Can u give me any specific link
    where these things are discussed well?My usual advice is to find and browse/read Bruce Schneier's "Applied Cryptography", ISBN 0-471-111709-9, Wiley&Sons pub. It's a very good introduction to the whole crypto field. There's also the "Handbook of Applied Cryptography" (HAC) - it's also a great book, but heavier on the math and not as accessible (IMNSHO) to the beginner as Schneier. However, it is available in PDF format - check here:
    http://www.cacr.math.uwaterloo.ca/hac/
    It's a fascinating field - good luck!
    Grant

  • TS4001 Salut : J'achète iPhone 5s, qui se replie doit être fermé sur activer l'iPhone est-il une solution ios7 icloud Je suis d'Algérie Il n'y a pas de vente de pommes en Algérie J'achète sur extrusion Je ne sais pas Je veux aider  IMEI (****)

    J'achète iPhone 5s, qui se replie doit être fermé sur activer l'iPhone est-il une solution ios7 icloud Je suis d'Algérie Il n'y a pas de vente de pommes en Algérie J'achète sur extrusion Je ne sais pas Je veux aider  IMEI (*****)
    <Edited By Host>

    Is this a used phone?
    If it is a used phone, and the previous owner has locked it, only he can unlock it. He must give you his Apple ID and password, or remove it from his list of devices:
    http://support.apple.com/kb/TS4515?viewlocale=fr_FR
    If you cannot contact him and get him to do this, you will be unable to use the phone. It will be permanently locked. Apple cannot unlock it for you.
    Est-ce un téléphone utilisé?
    S'il s'agit d'un téléphone utilisé, et le précédent propriétaire a verrouillé, il ne peut le déverrouiller. Il doit vous donner son Apple ID et mot de passe, ou le retirer de sa liste des périphériques: 
    http://support.apple.com/kb/TS4515?viewlocale=fr_FR 
    Si vous ne pouvez pas communiquer avec lui et lui faire faire cela, vous ne pourrez pas utiliser le téléphone. Il sera définitivement verrouillée. Apple ne peut pas débloquer pour vous.

  • Das neue Premiere Pro crashed beim laden des Projekts von der vorigen Version

    wie der Titel sagt....
    why? soll ich jetzt angst haben den cloudupdater zu verwenden weil dann alles instable wird? why? warum hat vor dem letzten update alles funktioniert und jetzt stürzt premiere pro beim laden des projekts ab. was soll ich nun denken? ist das genauso scheiße softwarephilosophie wie von unterweltklitschen? was ist da los? könnt ihr mir bitte helfen?
    ps; bis vor dem letzten cloudupdate hat alles funktioniert. jetzt crasht es!
    pps; wie argwöhnisch kann man werden wenn man mietsoftware anbietet. dass die software überhaupt crashed ist schon ein armutszeugnis für adobe.
    ppps: soll ich lieber die updates bleiben lassen? wenns mal stable läuft blos nicht mehr den adobe cloud updater laufen lassen? argh! +
    pppps: wie kann ich trotz cloud auf eine ältere version downgraden? (cih würde gerne das letzte cloudupdate rückgängig machen, weil obviously verursacht das probleme bei mir)
    ppppps: Vielen Dank für Ihr Feedback. Danke Adobe für dieses schöne stylische Element.

    Habe leider die gleichen leidvollen Erfahrungen gemacht, allerdings auf einem komplett neuen Rechner mit Aususboard. Dualcore CPU und alles was neu ist und Geld kostet.
    Ich findes es sehr bedauerlich, dass Matrox so viele Leute werkeln lässt nur um festzustellen, dass es nicht geht. Soviel Negativmarketing sollte man sich als renomierter Hersteller nicht leisten.
    Ein laufendes System kann nicht durch ein noch so tolles (auf dem Papier) neues nicht funktionierendes System ersetzt werden. Leider falle ich immer wieder darauf rein, andere wohl auch.
    In der Summe der verbrauchten Zeit ist das laufende System sicher besser.
    Wir Anwender sind da viel zu nachsichtig mit den Herstellern.
    Schade ist auch, dass Matrox keine Informationen gibt, wann denn 6153 durch ein wirklich funtionierendes Build ersetzt wird.
    Gruß
    Ulrich Muzyk

  • DES Encryption compatibility between Microsoft dot Net and Java

    Hi,
    I have a situation that a Secret key is shared between two components like Core and the Customer. The customer encrypts a particular data using DES algorithm using the shared secret key. The customer uses Microsoft dot Net framework to do this. The encrypted data comes to core part which has been developed in Java. I want to know whether it is possible to decrypt the data value using DES algorithm which is coming from Dot Net platform. By the way I am getting different values. I want to know whether the byte[] in Java and Dot Net are same. Please provide me relevent answers to this question. Is it possible to make interaction with the cryptography between two differnet environments like Java and Microsoft Dot Net. I mean only DES algorithm.

    DebadattaMishra wrote:
    Hi,
    I have a situation that a Secret key is shared between two components like Core and the Customer. The customer encrypts a particular data using DES algorithm using the shared secret key.Yuk! That is what SSL is for.
    The customer uses Microsoft dot Net framework to do this. The encrypted data comes to core part which has been developed in Java. I want to know whether it is possible to decrypt the data value using DES algorithm which is coming from Dot Net platform. Yes though there are many pitfalls. The devil is in the detail of the .NET code. I would not tackle this without access to the full .NET encryption code.
    By the way I am getting different values.This is not surprising since, as I said above, there are many pitfalls. The.NET documentation is poor at best and in some cases is very very misleading. Some of the .NET methods involved in key generation have obscure semantics and only after a very careful reading of lots of MS documentation did I start to understand the semantics.
    I want to know whether the byte[] in Java and Dot Net are same. You should compare the 'bits' of each byte and not the numeric values since Java uses signed bytes.
    Please provide me relevent answers to this question.This is not your call. Anyone is free to post answers as long as they follow the forum code of conduct.
    Is it possible to make interaction with the cryptography between two differnet environments like Java and Microsoft Dot Net. I mean only DES algorithm.Of course!

  • Utility to generate the triple des (3DES) encrypted password in wl 6.1?

    To take advantage of the encrypted passwords in config.xml, as of wl 6.1, is
    there a weblogic utiltiy or api tha could be used to encrypt plaintext into
    the triple-des symmetric key PRIOR to having an SA or DBA type it into the
    console? This would help me greatly in the deployment and security of
    passwords.
    Thanks in Advance,
    Steve Rogers

    Hi,
    Thank you for your question.
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Best Regards,
    Aiden
    Aiden Cao
    TechNet Community Support

  • Some problme in the export/import utility

    Dears,
    I am using HTML_DB v.1.6.1.00.03
    I ran export procedure and after that I am trying to run import one in the another ID application.
    I am getting the following error message:
    ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-02291: integrity constraint (FLOWS_010600.QUERY_COLUMN_TO_QRY_OBJECT_FK) violated - parent key not found <pre>declare&lt;br&gt; s varchar2(32767) := null;&lt;br&gt; l_clob clob;&lt;br&gt; l_length number := 1;&lt;br&gt;begin&lt;br&gt;s:=s||'SELECT '||chr(10)||&lt;br&gt;' &
    I sent full text of my application to your support's e-mail '[email protected]' on 29.11.05.
    Unfortunately I did not get any answer.
    I would greatly sincerely a prompt response.
    Best regards,
    Oleg Mochkin,
    ExLibris Israel
    Office: 972-2-6499211
    e-mail [email protected]

    Hi Scott,
    Sorry for misunderstanding.
    Unfortunately my application has 70 pages included 100 regions.
    Now it is very difficult for me to know which region has been copied.
    I has an additional problem. the problme is that when I had tried to send you my application by e-mail your e-mail machine returned me the following message
    ================================
    The original message was received at Fri, 16 Dec 2005 15:53:45 +0200 from il-exchange01.exlibris-int.il [10.1.235.66]
    ----- The following addresses had permanent fatal errors ----- <[email protected]>
    (reason: 554 5.7.1 Oracle Corporation does not accept mail with .ZIP attachments.)
    ----- Transcript of session follows ----- ... while talking to agminet04.oracle.com.:
    DATA<<< 554 5.7.1 Oracle Corporation does not accept mail with .ZIP attachments.
    554 5.0.0 Service unavailable
    =======================
    I sent you another e-mail with tar.gz archive.
    Please look into all my e-mails.
    Could you be available to check my application and probably to give me another decision of my problem?
    Thanks,
    Oleg

  • Error while opening LabView files - Bei der Weitergabe des Befehls an das Programm ist ein Fehler aufgetrete​n

    Hy Forum
    Some times ago i had some troubles while opening files in labiew....
    I want to open a LabView file (no matter if *.vi or *.lvproj file) from a network path (mapped network drive). The Windows User Account Control (Windows 7, 32bit) appears to asking me for giving access to my system settings! Oops, never seen this before, pressing yes button....
    Ok, but after this the following error message appears: 
    I don't know what the correct message in english is
    "An error occurred while executing this command"????
    "Bei Weitergabe des Befehls an das Programm ist ein Fehler aufgetreten"
    The LabView Getting Startet windows will be opened, but not the desired vi or project. Even if i try to open a project from the getting startet window or from the windows explorer, just the UAC window and the same error message.
    Easy as it is, just remove the "run as administrator" options on the compatibility settings of Labview and it will run without UAC confirm.
    And also files on network drives will be opened.
    Hope this would be helpful..

    Hi Dominik,
    thanks for posting your experience here. This may help someone down the line.
    LabVIEW should indeed not normally be run as admin as it works fine in Win7 when run as a standard user.
    Regards,
    Joseph Tagg

  • How to get the fixed result in a DES/CBC mode with fixed input data and fix

    How to get the fixed result in a DES/CBC mode with fixed input data and fixed key. Below is my program , I tried to get the checksum of the DESInputData with the DESKeyData, but each time the result is different.
    below is my code:
    byte[] DESKeyData = {(byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01, (byte)0x01 ,(byte)0x01 ,(byte)0x01 ,(byte)0x01 };
    byte[] DESInputData = {(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31,(byte)0x31 ,(byte)0x31 ,(byte)0x31 ,(byte)0x31 };
    SecretKeySpec skey = new SecretKeySpec( DESKeyData, "DES" );
    Cipher cipher = Cipher.getInstance("DES/CBC/NoPadding");
    cipher.init( Cipher.ENCRYPT_MODE, skey );
    byte[] result = cipher.doFinal( DESInputData );

    Use class javax.crypto.spec.IvParameterSpec to specify IV for CBC mode cipher:
    // Create CBC-mode triple-DES cipher.
    Cipher c = Cipher.getInstance("DESede/CBC/PKCS5Padding");
    // Specify IV.
    IvParameterSpec iv = new IvParameterSpec(new byte[] { (byte)0x01, (byte)0x23, (byte)0x45, (byte)0x67, (byte)0x89, (byte)0xAB, (byte)0xCD, (byte)0xEF });
    // Initialize cipher with proper IV.
    c.init(Cipher.ENCRYPT_MODE, yourKey, iv);
    // Encrypt and decrypt should work ok now.
    For more info about cryptography, search the Internet for IntroToCrypto.pdf from mr. Phil Zimmerman. This document is also part of PGP (http://www.pgp.com).
    An excellent book is 'Applied Cryptography' from Bruce Schneier (http://www.counterpane.com/applied.html).
    Regards,
    Ronald Maas

  • "Se ha producido algún error al intentar instalar esta aplicación" error when trying to install a .air application

    Hello,
    I'm having an issue when trying to install Warcraft Logs application:
    Warcraft Logs - Combat Analysis for Warcraft
    https://www.warcraftlogs.com/client/warcraftlogs.air
    I successfully install Adobe AIR, version 17.0.0.144 (and I'm using Windows 7 64 bits), without any problem (well, that's what I suppose), this is the Install.log from the Adobe AIR:
    [2015-04-19:19:27:30] Runtime Installer begin with version 17.0.0.144 on Windows 7 x86
    [2015-04-19:19:27:30] Commandline is:
    [2015-04-19:19:27:30] No installed runtime detected
    [2015-04-19:19:27:32] Relaunching with elevation
    [2015-04-19:19:27:32] Launching subprocess with commandline c:\users\alberto\appdata\local\temp\air276b.tmp\adobe air installer.exe -ei
    [2015-04-19:19:27:32] Runtime Installer begin with version 17.0.0.144 on Windows 7 x86
    [2015-04-19:19:27:32] Commandline is: -stdio \\.\pipe\AIR_5800_0 -ei
    [2015-04-19:19:27:32] No installed runtime detected
    [2015-04-19:19:27:32] Starting silent runtime install. Installing runtime version 17.0.0.144
    [2015-04-19:19:27:32] Installing msi at c:\users\alberto\appdata\local\temp\air276b.tmp\setup.msi with guid {34927EBC-98D4-4D53-98BE-510DF5999F50}
    [2015-04-19:19:27:33] Runtime Installer end with exit code 0
    [2015-04-19:19:27:34] Elevated install completed
    [2015-04-19:19:27:35] Launching subprocess with commandline c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Resources\Adobe AIR Updater -installupdatecheck
    [2015-04-19:19:27:35] Runtime Installer end with exit code 0
    [2015-04-19:19:27:35] Runtime Installer begin with version 17.0.0.144 on Windows 7 x86
    [2015-04-19:19:27:35] Commandline is: -installupdatecheck
    [2015-04-19:19:27:35] Installed runtime (17.0.0.144) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2015-04-19:19:27:35] Performing pingback request
    [2015-04-19:19:27:36] Pingback request completed with HTTP status 200
    [2015-04-19:19:27:36] Starting runtime background update check
    [2015-04-19:19:27:36] Begin Background update download from http://airdownload.adobe.com/air/3/background/windows/x86/patch/17.0.0.144/update
    [2015-04-19:19:27:36] Unpackaging http://airdownload.adobe.com/air/3/background/windows/x86/patch/17.0.0.144/update to C:\Users\Alberto\AppData\Roaming\Adobe\AIR\Updater\Background
    [2015-04-19:19:27:36] Runtime update not available
    [2015-04-19:19:27:36] Unpackaging cancelled
    [2015-04-19:19:27:36] Runtime Installer end with exit code 0
    Afterwards, I try to install the warcraftlogs.air application, and when I execute the program I get the following error:
    Se ha producido algún error al intentar instalar esta aplicación. Instale la versión más reciente de Adobe AIR desde http://www.adobe.com/go/getair_es y vuelva a intentarlo.
    Translated it should be something like this (this is not the official English message):
    Some error has occurred while trying to install this application. Install the latest Adobe AIR version from http://www.adobe.com/go/getair_es and try again.
    I've tried to search anything related, because I can't find that exact error message in any Adobe troubleshooting page, but everything I can find is a really old version issue, or something I've tried without success (trying to install everything running as administrator, also via cmd.exe ran as administrator, installing an older version, uninstalling and installing 100 times Adobe AIR, etc.).
    I've also searched (but not asked) in Warcraft Logs forums for any solution, but I couldn't find anything related either.
    Any help would be appreciated.
    Thank you in advance and best regards! ^^

    Inesipinesii please remove your current installation of the Adobe Download Assistant from your Applications folder.  You will then be able to reinstall the Adobe Download Assistant and begin the download process for Photoshop Elements 11.  You can find more information at http://helpx.adobe.com/creative-suite/kb/troubleshoot-download-assistant.html#main_Known_i ssues.

  • My iphone 4s having problm after i updated to ios 8

    i upgraded to ios 8 but it became problm for me pgone getting slow crushing of applications

    Hm... Try this----> http://support.apple.com/kb/ht1808 or http://osxdaily.com/2010/12/04/ipad-dfu-mode/

  • Error when using DES/CBC/PKCS5Padding

    When I using the captioned algorithm, the system repor no such algorithm.
    import javax.crypto.*;
    import javax.crypto.spec.*;
    Cipher c = Cipher.getInstance("DES/CBC/PKCS5Padding");Can anybody give me some tips?

    Don't worry, I found my mistake and solve the problem now.
    Thanks everybody.

  • FTP to mail scenario with DES decryption

    Hi All,
    I have a existing process where FTP data files are scheduled to be available at 1:00pm each day on the FTP server.  Earlier to support this, a Windows-based FTP client script has been developed by us  which automatically retrieves the files via the Internet and does a number of other tasks which are detailed below.  This script runs at 1:10pm each day, including weekends and holidays.  The script retrieves 3 files, which are saved locally, and then decrypted, archived, and finally transferred via mail and also FTP to specific Unix directories for import into various SAP systems
    I have a scenario where SAP PI needs to do the same stuff above that is pick a file from the ftp location and send it to a mail address. The file will be in encrypted format and SAP PI needs to decrypt the file and the decrypted file needs to be send through.
    The files at the FTP side are encrypted using DES Encryption so ideally SAP PI needs to decrypt it using DES decryption.
    I know I can keep the DES software on the UNIX server at XI side and call it in sender file adapter at OS level calls but as far as I know it will be difficult for maintenance as the logs won't be available for proper monitoring.
    What is the best way to achieve this  ?
    Thanks in advance.
    Ravijeet
    Edited by: RAVIJEET.SAP.PI on Dec 2, 2010 4:00 PM
    Edited by: RAVIJEET.SAP.PI on Dec 2, 2010 8:18 PM

    Any suggestions

  • Indesign CS6 (utilisé sous Mac) fait des exports PDF Print en RVB... Pourquoi ?

    Mon fichier indesign est en CMJN ; toutes les couleurs utilisées et les images importées le sont également mais au moment de l'export en PDF PRINT (Press Quality), le fichier PDF qui en ressort est en RVB...
    Où peut se situer le problème ?
    Merci.

    Dans ce cas, comment puis-je vérifier le mode colorimétrique d'un PDF ?
    Avec Acrobat Pro
    Le US Web... c'est celui qui était par défaut. Jusqu'à maintenant, il ne m'a jamais posé de problème... Y'a-t-il une norme en France ? Un mode privilégié ? ou plusieurs ?
    Le US Web par défaut ? Sur une version française d'InDesign ? Il me semblait que c'était le FOGRA 27.
    Non, il n'y a pas une norme, mais des normes : tout dépend du type d'impression (offset, hélio, feuille, roto, etc.) Soit tu utilises le profil fourni ou conseillé par l'imprimeur, et si tu ne le connais pas, je te conseille d'utiliser le ISO Coated v2 300% de l'ECI disponible ici (pour l'offset feuilles)

  • Hi icant sync my photos from itunes to iphone ..it shows copying 1 out of something but afterwards it stops and no photos in iphone ..i formatted several times ..and from my utunes i have sync my brothers iphone it synced prefectly only its problm of my p

    hi icant sync my photos from itunes to iphone ..it shows copying 1 out of something but afterwards it stops and no photos in iphone ..i formatted several times ..and from my utunes i have sync my brothers iphone it synced prefectly only its problm of my iphone .......i have also deleted the ipod photo cache but still the same

    can any 1 help me

Maybe you are looking for

  • Compiling jsp pages in wl 10.0 2 times slower than wl 9.1

    Hi: I have enterprise application. In weblogic 9 it took 4-5min to compile all the jsp pages, in weblogic 10 it takes 10-11min!! Is there anything I can do to speed it up?

  • Cant connect Wrt54g with SBC! please help

    Ok i just got the at&t internet package in the mail and i already set it up. I got a linksys wrt54g router and it just doesnt want to work. I get to the part where it says connecting to the internet but it just never connects. I went to dslreports.co

  • HELP.  IPOD not restoring!

    Hi any help would be ever so appreciated. Saturday on way round supermarket my Ipod stalled and couldn't turn on or off, and basically crashed. I have tried my best to troubleshoot it to work again. Fistly I have installed iTunes 7.2 Then I reset the

  • Black video windows in iTunes 11.1.5

    since update to iTunes 11.1.5 on Windows 7 - 64-bit, I got a black video window after starting a movie from store or bibliothek (trailer and also own videos). iTunes 11.1.4.62 works fine on my other Windows 7 in a virtual machine, but I don't have th

  • How to install preloader into html page?

    I'm sure this is a simple solution so thank you for helping. I've created a preloader to show the progress of a photo slideshow called landscape.swf It works fine when I test it in Flash 9. Question 1: Do I export the preloader as a .swf and place it