Hi,
I wrote a hasher file for sha1 hashing for chord protocol implementation. Here is the code :
package main
import (
"fmt"
"crypto/sha1"
"time"
)
func main() {
s:="Go is GOOD"
h:=sha1.New()
h.Write([]byte(s))
bs:=h.Sum(nil)
fmt.Println(s)
fmt.Println("%x \n",bs)
time.Sleep(12 * 1e9)
}
The problem is I want to convert the byte array obtained into Integer so that I can take mod of that value with some value. How to convert byte array to Integer in golang , I tried on net but could not find a good solution for this.
Also, please guide me if Golang is a good language for implementing distributed algorithm since I took up and have started learning golang for course project. Is there any limitation while implementing distributed algorithms like chord protocol.
Thansk & Regards
Abhinav