示例#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)
}