public ObjectId idFor(int type, byte[] data, int off, int len) {SHA1 md = SHA1.newInstance();md.update(Constants.encodedTypeString(type));md.update((byte) ' ');md.update(Constants.encodeASCII(len));md.update((byte) 0);md.update(data, off, len);return md.toObjectId();}

public ObjectId idFor ( int type , byte [ ] data , int off , int len ) { SHA1 md = SHA1 . newInstance ( ) ; md . update ( Constants . encodedTypeString ( type ) ) ; md . update ( ( byte ) ' ' ) ; md . update ( Constants . encodeASCII ( len ) ) ; md . update ( ( byte ) 0 ) ; md . update ( data , off , len ) ; return md . toObjectId ( ) ; }
public virtual ObjectId IdFor(int type, byte[] data, int off, int len){MessageDigest md = Digest();md.Update(Constants.EncodedTypeString(type));md.Update(unchecked((byte)' '));md.Update(Constants.EncodeASCII(len));md.Update(unchecked((byte)0));md.Update(data, off, len);return ObjectId.FromRaw(md.Digest());}
