Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FiloSottile/hstools
/ functions
Functions
95 in github.com/FiloSottile/hstools
⨍
Functions
95
◇
Types & classes
13
↓ 9 callers
Method
Next
(p *big.Int)
src/hstools/hashring.go:54
↓ 6 callers
Method
Close
()
src/hstools/keysdb.go:141
↓ 6 callers
Method
Diff
(from, to *big.Int)
src/hstools/hashring.go:86
↓ 6 callers
Function
ToBase32
(b []byte)
src/hstools/format.go:35
↓ 6 callers
Function
fatalIfErr
(err error)
src/cmd/scrolls.go:29
↓ 6 callers
Function
getAge
(h *hstools.Hash, now hstools.Hour, since time.Time, keysDB *hstools.KeysDB)
src/cmd/scrolls.go:36
↓ 6 callers
Function
getColo
(h *hstools.Hash, keysDB *hstools.KeysDB)
src/cmd/scrolls.go:74
↓ 6 callers
Function
getLongevity
(h *hstools.Hash, now hstools.Hour, until time.Time, keysDB *hstools.KeysDB)
src/cmd/scrolls.go:55
↓ 5 callers
Method
Distance
(p *big.Int)
src/hstools/stats.go:102
↓ 5 callers
Method
Next3
(p *big.Int)
src/hstools/hashring.go:61
↓ 4 callers
Method
Err
()
src/hstools/consensus.go:156
↓ 4 callers
Method
Lookup
(key Hash)
src/hstools/keysdb.go:125
↓ 4 callers
Function
NewHashring
NewHashring returns a Hashring with the given unsorted points.
src/hstools/hashring.go:32
↓ 4 callers
Function
colorScore
(v int64)
src/cmd/scrolls.go:88
↓ 4 callers
Function
exitIfErr
(t *testing.T, err error)
src/hstools/format_test.go:10
↓ 4 callers
Function
fatalIfErr
(err error)
src/cmd/lookmeup.go:20
↓ 3 callers
Method
Distance4
(p *big.Int)
src/hstools/stats.go:121
↓ 3 callers
Function
HashIdentity
(pk rsa.PublicKey)
src/hstools/brute.go:11
↓ 3 callers
Function
IntToHash
(i *big.Int)
src/hstools/format.go:81
↓ 3 callers
Function
OnionToDescID
(onion string, t time.Time)
src/hstools/descid.go:23
↓ 3 callers
Method
Prev
(p *big.Int)
src/hstools/hashring.go:79
↓ 3 callers
Method
View
(fn func(tx *bolt.Tx) error)
src/hstools/keysdb.go:137
↓ 3 callers
Function
bigMean
(nums []*big.Int)
src/hstools/stats.go:28
↓ 3 callers
Function
fatalIfErr
(err error)
src/cmd/grind.go:18
↓ 3 callers
Function
fatalIfErr
(err error)
src/cmd/brute.go:21
↓ 2 callers
Function
ComputeRendV2DescID
(serviceID string, replica byte, time int64, descCookie string)
src/hstools/descid.go:51
↓ 2 callers
Method
Consensus
()
src/hstools/consensus.go:152
↓ 2 callers
Method
Distance
Distance efficiently calculates the difference (b - a) mod 2^160, or distance a -> b on a 20-byte ring and stores it in d. a and b unchanged.
src/hstools/format.go:18
↓ 2 callers
Method
Distance4Data
()
src/hstools/stats.go:140
↓ 2 callers
Function
HourToTime
(h Hour)
src/hstools/format.go:58
↓ 2 callers
Method
Len
()
src/hstools/hashring.go:50
↓ 2 callers
Method
Load
()
src/hstools/consensus.go:127
↓ 2 callers
Function
ParseConsensus
ParseConsensus parses a consensus file and extracts the HSDir Hashring
src/hstools/consensus.go:51
↓ 2 callers
Function
ToHex
(b []byte)
src/hstools/format.go:43
↓ 2 callers
Function
bigAbsDev
func bigAbsDev(nums []*big.Int, mean *big.Int) *big.Int { avg := big.NewInt(0) size := big.NewInt(int64(len(nums))) for _, n := range nums { d := new(
src/hstools/stats.go:89
↓ 1 callers
Method
Age
(p *big.Int, now Hour, keysDB *KeysDB)
src/hstools/stats.go:208
↓ 1 callers
Function
AnalyzePartitionData
(data []*PartitionData)
src/hstools/stats.go:162
↓ 1 callers
Function
ColocatedKeys
(k []byte, keysDB *KeysDB)
src/hstools/stats.go:257
↓ 1 callers
Method
DistanceData
()
src/hstools/stats.go:152
↓ 1 callers
Method
Fourth
(p *big.Int)
src/hstools/hashring.go:72
↓ 1 callers
Function
FromBase32
(s string)
src/hstools/format.go:39
↓ 1 callers
Function
FromBase64
(s string)
src/hstools/format.go:51
↓ 1 callers
Function
FromHex
(s string)
src/hstools/format.go:47
↓ 1 callers
Function
HashesToIntSlice
(keys []Hash)
src/hstools/format.go:62
↓ 1 callers
Function
RandomDistance
(ring *hstools.Hashring)
src/cmd/montecarlo.go:20
↓ 1 callers
Function
RandomHashring
(entries int)
src/hstools/hashring.go:41
↓ 1 callers
Function
SampleDistance4
(h *Hashring)
src/hstools/stats.go:125
↓ 1 callers
Method
Seen
(keys []Hash, ips []string, h Hour, wg *sync.WaitGroup)
src/hstools/keysdb.go:52
↓ 1 callers
Function
bigSqrt
(n *big.Int)
src/hstools/stats.go:37
↓ 1 callers
Function
checkKey
(key *rsa.PrivateKey)
src/hstools/brute.go:27
↓ 1 callers
Function
find_responsible_HSDir
(descriptor_id, consensus)
src/retrieve_hs_descriptor.py:45
↓ 1 callers
Function
getSecretIDPartBytes
(timePeriod int64, descCookie string, replica byte)
src/hstools/descid.go:74
↓ 1 callers
Function
getTimePeriod
(time int64, deviation int64, serviceIDBinary []byte)
src/hstools/descid.go:70
↓ 1 callers
Function
get_secret_id_part_bytes
(time_period, descriptor_cookie, replica)
src/retrieve_hs_descriptor.py:31
↓ 1 callers
Function
get_time_period
(time, deviation, service_id)
src/retrieve_hs_descriptor.py:26
↓ 1 callers
Function
main
()
src/retrieve_hs_descriptor.py:68
↓ 1 callers
Function
plotDistance
()
src/cmd/montecarlo.go:25
↓ 1 callers
Function
rendGetDescriptorIDBytes
(serviceIDBinary, secretIDPart []byte)
src/hstools/descid.go:86
↓ 1 callers
Function
rend_compute_v2_desc_id
(service_id_base32, replica, time, descriptor_cookie = "")
src/retrieve_hs_descriptor.py:18
↓ 1 callers
Function
rend_get_descriptor_id_bytes
(service_id, secret_id_part)
src/retrieve_hs_descriptor.py:39
Method
AgeData
AgeData is not really in use, Age and Longevity are assessed in absolute
src/hstools/stats.go:243
Function
Brute
(targetA, targetB, maxA, maxB Hash, numKeys, numP int, log func(v ...interface{}))
src/hstools/brute.go:36
Method
Colocated
(p *big.Int, keysDB *KeysDB)
src/hstools/stats.go:232
Function
HashToInt
(k Hash)
src/hstools/format.go:88
Function
IntsToHashSlice
(ints []*big.Int)
src/hstools/format.go:70
Method
Len
()
src/hstools/hashring.go:27
Method
Less
(i, j int)
src/hstools/hashring.go:29
Method
Longevity
(p *big.Int, now Hour, keysDB *KeysDB)
src/hstools/stats.go:220
Function
NewPackReader
(filename string)
src/hstools/consensus.go:114
Function
OpenKeysDb
(filename string)
src/hstools/keysdb.go:27
Function
ReadConsensuses
ReadConsensuses reads consensus files from a folder structure like DIR/consensuses-2011-02/04/2011-02-04-02-00-00-consensus and sends them on the retu
src/hstools/consensus.go:29
Function
SHA1
(data []byte)
src/hstools/format.go:30
Function
SampleDistance
(h *Hashring)
src/hstools/stats.go:106
Function
Score
(v *big.Int, res *MetricData)
src/hstools/stats.go:203
Method
Swap
(i, j int)
src/hstools/hashring.go:28
Function
TestAnalyzePartitionData
(t *testing.T)
src/hstools/stats_test.go:5
Function
TestCurrentOnion
(t *testing.T)
src/hstools/descid_test.go:22
Function
TestFacebookOnion
(t *testing.T)
src/hstools/descid_test.go:8
Function
TestHashDistance
(t *testing.T)
src/hstools/format_test.go:16
Function
TestHashIdentity
(t *testing.T)
src/hstools/brute_test.go:10
Function
TestHashringDistance
(t *testing.T)
src/hstools/hashring_test.go:31
Function
TestHashringNext
(t *testing.T)
src/hstools/hashring_test.go:8
Function
TestParseConsensus
(t *testing.T)
src/hstools/consensus_test.go:10
Function
WSServer
(ws *websocket.Conn)
src/cmd/announce.go:20
Function
WritePackedConsensus
(w io.Writer, c *Consensus)
src/hstools/consensus.go:94
Function
bigCubeRoot
(n *big.Int)
src/hstools/stats.go:52
Function
bigStdDev
(nums []*big.Int, mean *big.Int)
src/hstools/stats.go:67
Function
main
()
src/cmd/grind.go:24
Function
main
()
src/cmd/lookmeup.go:26
Function
main
()
src/cmd/scrolls.go:101
Function
main
()
src/cmd/brute.go:27
Function
main
()
src/cmd/announce.go:53
Function
main
()
src/cmd/curiosity.go:18
Function
main
()
src/cmd/montecarlo.go:65
Function
main
()
src/cmd/preprocess.go:16