public org.spongycastle.crypto.BlockCipher getUnderlyingCipher() { return cipher.getUnderlyingCipher(); }
public BlockCipher getUnderlyingCipher() { return cipher.getUnderlyingCipher(); }
public org.spongycastle.crypto.BlockCipher getUnderlyingCipher() { return cipher.getUnderlyingCipher(); }
protected JCEBlockCipher( BufferedBlockCipher engine, int ivLength) { baseEngine = engine.getUnderlyingCipher(); this.cipher = new BufferedGenericBlockCipher(engine); this.ivLength = ivLength / 8; }
protected BaseBlockCipher( BufferedBlockCipher engine, int ivLength) { baseEngine = engine.getUnderlyingCipher(); this.cipher = new BufferedGenericBlockCipher(engine); this.ivLength = ivLength / 8; }
protected BaseBlockCipher( BufferedBlockCipher engine, int ivLength) { baseEngine = engine.getUnderlyingCipher(); this.cipher = new BufferedGenericBlockCipher(engine); this.ivLength = ivLength / 8; }
public String getAlgorithmName() { return cipher.getUnderlyingCipher().getAlgorithmName(); }
public String getAlgorithmName() { return cipher.getUnderlyingCipher().getAlgorithmName(); }
public String getAlgorithmName() { return cipher.getUnderlyingCipher().getAlgorithmName(); }
protected void engineSetPadding( String padding) throws NoSuchPaddingException { String paddingName = Strings.toUpperCase(padding); if (paddingName.equals("NOPADDING")) { cipher = new BufferedBlockCipher(cipher.getUnderlyingCipher()); } else if (paddingName.equals("PKCS5PADDING") || paddingName.equals("PKCS7PADDING") || paddingName.equals("ISO10126PADDING")) { cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher()); } else if (paddingName.equals("WITHCTS")) { cipher = new CTSBlockCipher(cipher.getUnderlyingCipher()); } else { throw new NoSuchPaddingException("Padding " + padding + " unknown."); } }
protected void engineSetPadding( String padding) throws NoSuchPaddingException { String paddingName = Strings.toUpperCase(padding); if (paddingName.equals("NOPADDING")) { cipher = new BufferedBlockCipher(cipher.getUnderlyingCipher()); } else if (paddingName.equals("PKCS5PADDING") || paddingName.equals("PKCS7PADDING") || paddingName.equals("ISO10126PADDING")) { cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher()); } else if (paddingName.equals("WITHCTS")) { cipher = new CTSBlockCipher(cipher.getUnderlyingCipher()); } else { throw new NoSuchPaddingException("Padding " + padding + " unknown."); } }
protected AlgorithmParameters engineGetParameters() { if (engineParams == null) { if (ivParam != null) { String name = cipher.getUnderlyingCipher().getAlgorithmName(); if (name.indexOf('/') >= 0) { name = name.substring(0, name.indexOf('/')); } try { engineParams = AlgorithmParameters.getInstance(name, BouncyCastleProvider.PROVIDER_NAME); engineParams.init(ivParam.getIV()); } catch (Exception e) { throw new RuntimeException(e.toString()); } } } return engineParams; }
protected AlgorithmParameters engineGetParameters() { if (engineParams == null) { if (ivParam != null) { String name = cipher.getUnderlyingCipher().getAlgorithmName(); if (name.indexOf('/') >= 0) { name = name.substring(0, name.indexOf('/')); } try { engineParams = AlgorithmParameters.getInstance(name, BouncyCastleProvider.PROVIDER_NAME); engineParams.init(ivParam.getIV()); } catch (Exception e) { throw new RuntimeException(e.toString()); } } } return engineParams; }
cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher()); ivLength = cipher.getUnderlyingCipher().getBlockSize(); cipher = new PaddedBufferedBlockCipher( new CBCBlockCipher(cipher.getUnderlyingCipher())); ivLength = cipher.getUnderlyingCipher().getBlockSize(); if (modeName.length() != 3) new OFBBlockCipher(cipher.getUnderlyingCipher(), wordSize)); new OFBBlockCipher(cipher.getUnderlyingCipher(), 8 * cipher.getBlockSize())); ivLength = cipher.getUnderlyingCipher().getBlockSize(); if (modeName.length() != 3) new CFBBlockCipher(cipher.getUnderlyingCipher(), wordSize)); new CFBBlockCipher(cipher.getUnderlyingCipher(), 8 * cipher.getBlockSize()));
cipher = new PaddedBufferedBlockCipher(cipher.getUnderlyingCipher()); ivLength = cipher.getUnderlyingCipher().getBlockSize(); cipher = new PaddedBufferedBlockCipher( new CBCBlockCipher(cipher.getUnderlyingCipher())); ivLength = cipher.getUnderlyingCipher().getBlockSize(); if (modeName.length() != 3) new OFBBlockCipher(cipher.getUnderlyingCipher(), wordSize)); new OFBBlockCipher(cipher.getUnderlyingCipher(), 8 * cipher.getBlockSize())); ivLength = cipher.getUnderlyingCipher().getBlockSize(); if (modeName.length() != 3) new CFBBlockCipher(cipher.getUnderlyingCipher(), wordSize)); new CFBBlockCipher(cipher.getUnderlyingCipher(), 8 * cipher.getBlockSize()));
public static IESParameterSpec guessParameterSpec(BufferedBlockCipher iesBlockCipher, byte[] nonce) { if (iesBlockCipher == null) { return new IESParameterSpec(null, null, 128); } else { BlockCipher underlyingCipher = iesBlockCipher.getUnderlyingCipher(); if (underlyingCipher.getAlgorithmName().equals("DES") || underlyingCipher.getAlgorithmName().equals("RC2") || underlyingCipher.getAlgorithmName().equals("RC5-32") || underlyingCipher.getAlgorithmName().equals("RC5-64")) { return new IESParameterSpec(null, null, 64, 64, nonce); } else if (underlyingCipher.getAlgorithmName().equals("SKIPJACK")) { return new IESParameterSpec(null, null, 80, 80, nonce); } else if (underlyingCipher.getAlgorithmName().equals("GOST28147")) { return new IESParameterSpec(null, null, 256, 256, nonce); } return new IESParameterSpec(null, null, 128, 128, nonce); } } }
cipher.getUnderlyingCipher().getAlgorithmName(), pbeKeySize, pbeIvSize);
cipher.getUnderlyingCipher().getAlgorithmName(), pbeKeySize, pbeIvSize);