code: public static String normalizeKey(String key) {
          if (StringUtils.isBlank(key)) {
              key = RSG.generate(16);
          } else if (key.length() > 16) {
              key = key.substring(0, 16);
          } else if (key.length() < 16) {
              key += RSG.generate(16 - key.length());
          }
          return key;
      }
docs: AES key should be 16 bytes in length.
  
  @param key
  @return