Yes, I tried the following code: SecretKeySpec keySpec = new SecretKeySpec(JavaUtils.getBytesFromFile(keyFile), algorithm); SecretKeyFactory skf = SecretKeyFactory.getInstance(algorithm); SecretKey key = skf.generateSecret(keySpec);
The exception I receive is java.security.NoSuchAlgorithmException: AES not found at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:86) But how can that be? I used AES for encryption… Any ideas? Thanks Dominik > Dominik Schadow wrote: > > >Hello, > > > >how can I decrypt an AES encrypted XML-document? I understand how to do > it > >with DESede: > > > >File kekFile = new File(keyFile); > >DESedeKeySpec keySpec = new > >DESedeKeySpec(JavaUtils.getBytesFromFile(keyFile)); > >SecretKeyFactory skf = SecretKeyFactory.getInstance("DESede"); > >SecretKey key = skf.generateSecret(keySpec); > > > >But how does it work with AES or Blowfish? > > > Did you try using the *javax.crypto.spec.SecretKeySpec *class? > > Vishal > > > The problem is only loading the > >key file. Does anyone have a code sample for that? > > > >Thank you very much. > > > >Dominik > > > > > > > > > -- +++ GMX DSL-Tarife 3 Monate gratis* +++ Nur bis 25.7.2004 +++ Bis 24.000 MB oder 300 Freistunden inkl. http://www.gmx.net/de/go/dsl