code: private static byte[] initIv(String fullAlg) {
  
          try {
              Cipher cipher = Cipher.getInstance(fullAlg);
              int blockSize = cipher.getBlockSize();
              byte[] iv = new byte[blockSize];
              for (int i = 0; i < blockSize; ++i) {
                  iv[i] = 0;
              }
              return iv;
          } catch (Exception e) {
  
              int blockSize = 16;
              byte[] iv = new byte[blockSize];
              for (int i = 0; i < blockSize; ++i) {
                  iv[i] = 0;
              }
              return iv;
          }
      }
docs: 初始向量的方法, 全部为0. 这里的写法适合于其它算法,针对AES算法的话,IV值一定是128位的(16字节).
  
  @param fullAlg
  @return
  @throws GeneralSecurityException