< prev index next >

src/share/classes/com/sun/crypto/provider/BlowfishParameters.java

Print this page
rev 1387 : 7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
Reviewed-by: xuelei, mullan
Contributed-by: alexandre.boulgakov@oracle.com

*** 1,7 **** /* ! * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 23,39 **** * questions. */ package com.sun.crypto.provider; - import java.util.*; import java.io.*; - import sun.security.util.*; import java.security.AlgorithmParametersSpi; import java.security.spec.AlgorithmParameterSpec; import java.security.spec.InvalidParameterSpecException; - import javax.crypto.spec.IvParameterSpec; /** * This class implements the parameter (IV) used with the Blowfish algorithm in * feedback-mode. IV is defined in the standards as follows: * --- 23,36 ----
*** 66,78 **** protected void engineInit(byte[] encoded, String decodingMethod) throws IOException { core.init(encoded, decodingMethod); } ! protected AlgorithmParameterSpec engineGetParameterSpec(Class paramSpec) throws InvalidParameterSpecException { return core.getParameterSpec(paramSpec); } protected byte[] engineGetEncoded() throws IOException { return core.getEncoded(); } --- 63,81 ---- protected void engineInit(byte[] encoded, String decodingMethod) throws IOException { core.init(encoded, decodingMethod); } ! protected <T extends AlgorithmParameterSpec> ! T engineGetParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException { + if (AlgorithmParameterSpec.class.isAssignableFrom(paramSpec)) { return core.getParameterSpec(paramSpec); + } else { + throw new InvalidParameterSpecException + ("Inappropriate parameter Specification"); + } } protected byte[] engineGetEncoded() throws IOException { return core.getEncoded(); }
< prev index next >