Commit 30fd613d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent df579315
// Copyright (C) 2017-2020 Nexedi SA and Contributors. // Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com> // Kirill Smelkov <kirr@nexedi.com>
// //
// This program is free software: you can Use, Study, Modify and Redistribute // This program is free software: you can Use, Study, Modify and Redistribute
...@@ -48,6 +48,8 @@ func Sum(b []byte) [sha1.Size]byte { ...@@ -48,6 +48,8 @@ func Sum(b []byte) [sha1.Size]byte {
// //
// it is the same as regular SHA1, but returns all-zeros for empty b. // it is the same as regular SHA1, but returns all-zeros for empty b.
// https://lab.nexedi.com/nexedi/neoppod/blob/c1c26894/neo/client/app.py#L464-468 // https://lab.nexedi.com/nexedi/neoppod/blob/c1c26894/neo/client/app.py#L464-468
//
// XXX merge into Sum?
func NEOSum(b []byte) [sha1.Size]byte { func NEOSum(b []byte) [sha1.Size]byte {
if len(b) == 0 { if len(b) == 0 {
return [sha1.Size]byte{} // all 0 return [sha1.Size]byte{} // all 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment