code: protected synchronized MessageDigest getDigest() {
          if (this.digest == null) {
              try {
                  this.digest = MessageDigest.getInstance(algorithm);
              } catch (NoSuchAlgorithmException e) {
                  try {
                      this.digest = MessageDigest.getInstance(DEFAULT_ALGORITHM);
                  } catch (NoSuchAlgorithmException f) {
                      this.digest = null;
                  }
              }
          }
          return (this.digest);
      }
docs: Return the MessageDigest object to be used for calculating session identifiers. If none has been created yet, initialize
  one the first time this method is called.