(data []byte)
| 440 | } |
| 441 | |
| 442 | func Sha1DigestKey(data []byte) string { |
| 443 | digester := sha1.New() |
| 444 | digester.Write(data) |
| 445 | return "sha1-" + base64.StdEncoding.EncodeToString(digester.Sum(nil)) |
| 446 | } |
| 447 | |
| 448 | // MakeAttachmentKey returns the unique for attachment storage and retrieval. |
| 449 | func MakeAttachmentKey(version int, docID, digest string) string { |