[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] PbeWithMD5AndDES_CBC



Fellows,

sorry, it's me again. :)

Using IAIK JCE 2.5, I get a NoSuchAlgorithmException when I try to
get the PbeWithMD5AndDES_CBC Cipher instance...

here's the source code, somewhat derived from the example of 
class "iaik.security.cipher.PbeWithMD5AndDES_CBC":

------ SNIP ------ SNIP ----
Security.addProvider(new IAIK());
// create PasswordBasedEncryption (PBE) parameters: 
// first salt, 8 bytes long
SecureRandom random = new SecureRandom(SecureRandom.getSeed(20));
byte[] salt = new byte[8]; 
random.nextBytes(salt); 
//next, iteration count
int count = 1;
// PBE paramters
PBEParameterSpec _pbeParamSpec = new PBEParameterSpec(salt, count);
// PBEKey from password
PBEKey pbeKey = new PBEKey("password");
try {
    Cipher pbeCipher = Cipher.getInstance("PbeWithMD5AndDES_CBC");
} catch (NoSuchAlgorithmException nsae) {
    System.out.println("Algorithm not found!!");
} catch (Exception e) {
    ...
}
...
------ SNIP ------ SNIP ----

Any help appreciated,

Michel

// pallas  GmbH  ............  Michel Drescher  .........
   Hermuelheimer Str. 10       Analyst                   
   D-50321 Bruehl, Germany     drescher@pallas.com        
   fax +49-(0)2232-1896-29     phone  +49-(0)2232-1896-0 
   http://www.pallas.de        direct +49-(0)2232-1896-30
.........................................................


--
Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html

To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-jce