Code example for NoSuchPaddingException

0
    throw new NoSuchAlgorithmException("only one mode available");
  } 
 
  protected void engineSetPadding(String pad) throws NoSuchPaddingException
  { 
    throw new NoSuchPaddingException("only one padding available");
  } 
 
  protected int engineGetBlockSize() 
  { 
    return 1; 
  } 
 
  protected int engineGetOutputSize(int inputLen)
  { 
    int outputLen = 0;
    if (decipherKey != null)
      outputLen = (decipherKey.getModulus().bitLength() + 7) / 8;
    else if (encipherKey != null)
      outputLen = (encipherKey.getModulus().bitLength() + 7) / 8;
    else