code: public static byte[] generateSalt(String saltString) {
          byte[] output = null;
          if (saltString == null || saltString.length() < 1) {
              // use randomly generated value
              output = new byte[SEED_LENGTH];
              SecureRandom rand = new SecureRandom();
              rand.setSeed(rand.generateSeed(SEED_LENGTH));
              rand.nextBytes(output);
          } else {
              try {
                  output = saltString.getBytes("UTF-8");
              } catch (UnsupportedEncodingException e) {
                  // fall back to default encoding. since the value won't be converted to the string, this is not an issue.
                  output = saltString.getBytes();
              }
          }
          return output;
      }
docs: generate salt value by using given string.
  salt was generated as following format
  String format of current time + given string + hostname