RefFromBytes returns a blobref from the given string, for the currently recommended hash function.
(b []byte)
| 438 | // RefFromBytes returns a blobref from the given string, for the currently |
| 439 | // recommended hash function. |
| 440 | func RefFromBytes(b []byte) Ref { |
| 441 | h := NewHash() |
| 442 | h.Write(b) |
| 443 | return RefFromHash(h) |
| 444 | } |
| 445 | |
| 446 | type sha1Digest [20]byte |
| 447 |