code: public byte[] digest() {
      byte[] result = new byte[20];
      
      finalBuffer.put((byte)0x80);
      if(finalBuffer.remaining() < 8) {
        while(finalBuffer.remaining() > 0) {
          finalBuffer.put((byte)0);
        }
        finalBuffer.position(0);
        transform(finalBuffer);
        finalBuffer.position(0);
      }
      
      while(finalBuffer.remaining() > 8) {
        finalBuffer.put((byte)0);
      }
      
      finalBuffer.putLong(length << 3);
      finalBuffer.position(0);
      transform(finalBuffer);
      
      finalBuffer.position(0);
      finalBuffer.putInt(h0);
      finalBuffer.putInt(h1);
      finalBuffer.putInt(h2);
      finalBuffer.putInt(h3);
      finalBuffer.putInt(h4);    
      finalBuffer.position(0);
      
      for(int i  = 0 ; i < 20 ; i++) {
       result[i] = finalBuffer.get(); 
      }
      
      return result;
    }
docs: Finishes the SHA-1 message digest calculation.
  @return 20-byte hash result