diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-14 23:12:35 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-14 23:12:35 +0000 |
commit | ffde862e033a0825e1e9972a89c0f1f80b261a8e (patch) | |
tree | 97037d2c09c8384d80531f67ec36a01205df6bdb /libjava/classpath/gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java | |
parent | b415ff10527e977c3758234fd930e2c027bfa17d (diff) | |
download | ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.tar.gz ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.zip |
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java')
-rw-r--r-- | libjava/classpath/gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libjava/classpath/gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java b/libjava/classpath/gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java index 72defe1d7f2..4bba171f9c1 100644 --- a/libjava/classpath/gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java +++ b/libjava/classpath/gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java @@ -35,6 +35,7 @@ this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package gnu.javax.crypto.jce.key; import java.security.InvalidKeyException; @@ -45,43 +46,42 @@ import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactorySpi; import javax.crypto.spec.SecretKeySpec; -public abstract class SecretKeyFactoryImpl extends SecretKeyFactorySpi +public abstract class SecretKeyFactoryImpl + extends SecretKeyFactorySpi { protected SecretKeyFactoryImpl() { } - protected SecretKey engineGenerateSecret (KeySpec spec) - throws InvalidKeySpecException + protected SecretKey engineGenerateSecret(KeySpec spec) + throws InvalidKeySpecException { if (spec instanceof SecretKeySpec) return (SecretKey) spec; - throw new InvalidKeySpecException ("unknown key spec: " + - spec.getClass().getName()); + throw new InvalidKeySpecException("unknown key spec: " + + spec.getClass().getName()); } - protected KeySpec engineGetKeySpec (SecretKey key, Class spec) - throws InvalidKeySpecException + protected KeySpec engineGetKeySpec(SecretKey key, Class spec) + throws InvalidKeySpecException { - if (spec.equals (SecretKeySpec.class)) + if (spec.equals(SecretKeySpec.class)) { if (key instanceof SecretKeySpec) return (KeySpec) key; else - return new SecretKeySpec (key.getEncoded(), key.getAlgorithm()); + return new SecretKeySpec(key.getEncoded(), key.getAlgorithm()); } - throw new InvalidKeySpecException ("unsupported key spec: " + - spec.getName()); + throw new InvalidKeySpecException("unsupported key spec: " + spec.getName()); } - protected SecretKey engineTranslateKey (SecretKey key) - throws InvalidKeyException + protected SecretKey engineTranslateKey(SecretKey key) + throws InvalidKeyException { - if (!"RAW".equals (key.getFormat())) - throw new InvalidKeyException ("only raw keys are supported"); - + if (! "RAW".equals(key.getFormat())) + throw new InvalidKeyException("only raw keys are supported"); // SecretKeySpec is good enough for our purposes. - return new SecretKeySpec (key.getEncoded(), key.getAlgorithm()); + return new SecretKeySpec(key.getEncoded(), key.getAlgorithm()); } } |