Hash of the Hello message to be received. This hash is sent by the other
end as part of the SDP for further verification.

@param version
ZRTP version of the hash
@param helloHash
Hello hash received as part of SDP in SIP
501995
public void setSdpHelloHash(String version, String helloHash) {
		if (!version.startsWith(VERSION_PREFIX)) {
			logWarning("Different version number: '" + version + "' Ours: '"
					+ VERSION_PREFIX + "' (" + VERSION + ")");
		}
		sdpHelloHashReceived = helloHash;
	}
874551
public MethodHash computeHash(Method method) {
        final MessageDigest digest = Util.getMD5Digest();

        byte[] code;
        if (method.getCode() == null || method.getCode().getCode() == null) {
            code = new byte[0];
        } else {
            code = method.getCode().getCode();
        }

        BytecodeScanner.Callback callback = (opcode, index) -> digest.update((byte) opcode);

        BytecodeScanner bytecodeScanner = new BytecodeScanner();
        bytecodeScanner.scan(code, callback);

        hash = digest.digest();

        return this;
    }
844557
protected function sendHello($hello, $host)
    {
        $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250);
        $this->helo_rply = $this->last_reply;
        return $noerror;
    }
110495
def do_hello(self, sin, sout, name=None):
        
        name = '' if name is None else '/' + name
        r = requests.get('http://localhost:8090/hello' + name)
        sout.write(r.text + '\n')
1076419
final byte[] hash(final byte[] input, final int offset, final int len) {
		mdHash.update(input, offset, len);
		return mdHash.digest();
	}
1061198
public static String hashSHA( String str ) {
        byte[] b = str.getBytes();
        MessageDigest md = null;
        try {
            md = MessageDigest.getInstance( "SHA1" );
            md.update( b );
        }
        catch ( NoSuchAlgorithmException e ) {
            e.printStackTrace();
            // it's got to be there
        }
        return toHexString( md.digest() );
    }
1042518
public static String calculateSHAHash(String s) throws
    NoSuchAlgorithmException, UnsupportedEncodingException
  {
    MessageDigest md = MessageDigest.getInstance("SHA-256");
    md.update(s.getBytes("UTF-8"));
    byte[] digest = md.digest();

    StringBuilder hashVal = new StringBuilder();
    for (byte b : digest)
    {
      hashVal.append(String.format("%02x", b));
    }

    return hashVal.toString();
  }
135252
@Override
  UpdateReturnState hashUpdate(final long hash) {
    HashOperations.checkHashCorruption(hash);

    mem_.putByte(FLAGS_BYTE, (byte) (mem_.getByte(FLAGS_BYTE) & ~EMPTY_FLAG_MASK));
    final long thetaLong = getThetaLong();
    final int lgNomLongs = getLgNomLongs();
    //The over-theta test
    if (HashOperations.continueCondition(thetaLong, hash)) {
      return RejectedOverTheta; //signal that hash was rejected due to theta or zero.
    }

    final int lgArrLongs = getLgArrLongs();
    final int preambleLongs = mem_.getByte(PREAMBLE_LONGS_BYTE) & 0X3F;

    //The duplicate test
    final int index =
        HashOperations.fastHashSearchOrInsert(mem_, lgArrLongs, hash, preambleLongs << 3);
    if (index >= 0) {
      return RejectedDuplicate; //Duplicate, not inserted
    }
    //insertion occurred, increment curCount
    final int curCount = getRetainedEntries() + 1;
    mem_.putInt(RETAINED_ENTRIES_INT, curCount); //update curCount

    if (isOutOfSpace(curCount)) { //we need to do something, we are out of space

      if (lgArrLongs > lgNomLongs) { //at full size, rebuild
        //Assumes no dirty values, changes thetaLong, curCount_
        assert (lgArrLongs == (lgNomLongs + 1))
            : "lgArr: " + lgArrLongs + ", lgNom: " + lgNomLongs;
        //rebuild, refresh curCount based on # values in the hashtable.
        quickSelectAndRebuild(mem_, preambleLongs, lgNomLongs);
      } //end of rebuild, exit

      else { //Not at full size, resize. Should not get here if lgRF = 0 and memCap is too small.
        final int lgRF = getLgRF();
        final int actLgRF = actLgResizeFactor(mem_.getCapacity(), lgArrLongs, preambleLongs, lgRF);
        int tgtLgArrLongs = Math.min(lgArrLongs + actLgRF, lgNomLongs + 1);

        if (actLgRF > 0) { //Expand in current Memory
          //lgArrLongs will change; thetaLong, curCount will not
          resize(mem_, preambleLongs, lgArrLongs, tgtLgArrLongs);
          hashTableThreshold_ = setHashTableThreshold(lgNomLongs, tgtLgArrLongs);
        } //end of Expand in current memory, exit.

        else {
          //Request more memory, then resize. lgArrLongs will change; thetaLong, curCount will not
          final int preBytes = preambleLongs << 3;
          tgtLgArrLongs = Math.min(lgArrLongs + lgRF, lgNomLongs + 1);
          final int tgtArrBytes = 8 << tgtLgArrLongs;
          final int reqBytes = tgtArrBytes + preBytes;

          memReqSvr_ = (memReqSvr_ == null) ? mem_.getMemoryRequestServer() : memReqSvr_;

          final WritableMemory newDstMem = memReqSvr_.request(reqBytes);

          moveAndResize(mem_, preambleLongs, lgArrLongs, newDstMem, tgtLgArrLongs, thetaLong);

          memReqSvr_.requestClose(mem_, newDstMem);

          mem_ = newDstMem;
          hashTableThreshold_ = setHashTableThreshold(lgNomLongs, tgtLgArrLongs);

        } //end of Request more memory to resize
      } //end of resize
    }
    return InsertedCountIncremented;
  }
135854
public static int methodHash(Object runner, FrameworkMethod method) {
        return ((Thread.currentThread().hashCode() * 31) + runner.hashCode()) * 31 + method.hashCode();
    }
132274
def to_h
      h = {}
      to_hash(@root_node).each do |k, v|
        key = k.terminate(false).to_string
        h[key] = v
      end
      h
    end
6289
function Hello($host="") {
    $this->error = null; # so no confusion is caused

    if(!$this->connected()) {
      $this->error = array(
      "error" => "Called Hello() without being connected");
      return false;
    }

    # if a hostname for the HELO wasn't specified determine
    # a suitable one to send
    if(empty($host)) {
      # we need to determine some sort of appopiate default
      # to send to the server
      $host = "localhost";
    }

    // Send extended hello first (RFC 2821)
    if(!$this->SendHello("EHLO", $host))
    {
      if(!$this->SendHello("HELO", $host))
      return false;
    }

    return true;
  }
940535
public static byte[] hashTwice(byte[] input1, byte[] input2) {
        MessageDigest digest = newDigest();
        digest.update(input1);
        digest.update(input2);
        return digest.digest(digest.digest());
    }
87646
private String hashKeyForDisk(LoaderRequest request) {
        String key = request.getCacheKey();

        // We don't except to have a lot of threads
        // so it's okay to synchronize access
        synchronized (hasher) {
            return hasher.hash(key);
        }
    }
583384
public final void mHASH() throws RecognitionException {
		try {
			int _type = HASH;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:315:9: ( '#' )
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:315:13: '#'
			{
			match('#'); if (state.failed) return;
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
2722
protected static String openssl_X509_NAME_hash(X500Principal p) throws Exception {
        // This code replicates OpenSSL's hashing function
        // DER-encode the Principal, MD5 hash it, then extract the first 4 bytes and reverse their positions
        byte[] derEncodedSubject = p.getEncoded();
        byte[] md5 = MessageDigest.getInstance("MD5").digest(derEncodedSubject);

        // Reduce the MD5 hash to a single unsigned long
        byte[] result = new byte[] { md5[3], md5[2], md5[1], md5[0] };
        return toHex(result);
    }
963713
protected byte[] EMSA_PKCS1_V1_5_ENCODE_HASH(byte[] h, int emLen, String algorithm) throws NoSuchAlgorithmException {

        // Check m
        if (h == null || h.length == 0) {
            throw new IllegalArgumentException("m");
        }

        byte[] algorithmPrefix = null;

        // Check algorithm
        if (Strings.isNullOrWhiteSpace(algorithm)) {
            throw new IllegalArgumentException("algorithm");
        }

        // Only supported algorithms
        if (algorithm.equals("SHA-256")) {

            // Initialize prefix and digest
            algorithmPrefix = SHA_256_PREFIX;

            if (h.length != 32) {
                throw new IllegalArgumentException("h is incorrect length for SHA-256");
            }
        } else {
            throw new IllegalArgumentException("algorithm");
        }


        // Construct t, the DER encoded DigestInfo structure
        byte[] t = new byte[algorithmPrefix.length + h.length];

        System.arraycopy(algorithmPrefix, 0, t, 0, algorithmPrefix.length);
        System.arraycopy(h, 0, t, algorithmPrefix.length, h.length);

        if (emLen < t.length + 11) {
            throw new IllegalArgumentException("intended encoded message length too short");
        }

        // Construct ps
        byte[] ps = new byte[emLen - t.length - 3];

        for (int i = 0; i < ps.length; i++) {
            ps[i] = (byte) 0xff;
        }

        // Construct em
        byte[] em = new byte[ps.length + t.length + 3];

        em[0] = 0x00; em[1] = 0x01; em[ps.length + 2] = 0x00;

        System.arraycopy(ps, 0, em, 2, ps.length);
        System.arraycopy(t, 0, em, ps.length + 3, t.length);

        return em;
    }
1118671
public Response<String> hmset(final byte[] key, final Map<byte[], byte[]> hash) {
        writeAsync(key, () -> shadowPipeline.hmset(key, hash));

        return DynoDualWriterPipeline.super.hmset(key,hash);
    }