예제 #1
0
파일: std.go 프로젝트: majestrate/go-i2p
// get the skiplist file that a RouterInfo with this hash would go in
func (db StdNetDB) SkiplistFile(hash common.Hash) (fpath string) {
	fname := base64.EncodeToString(hash[:])
	fpath = filepath.Join(db.Path(), fmt.Sprintf("r%c", fname[0]), fmt.Sprintf("routerInfo-%s.dat", fname))
	return
}
예제 #2
0
//
// Generate the I2P base64 address for this Destination.
//
func (destination Destination) Base64() string {
	return base64.EncodeToString(destination)
}