blob: 895edae7bb0f62ee1ae8e091630595392302008a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package onionkey
import (
"github.com/wybiral/torgo"
)
// Key is generic interface type for Tor onion keys.
type Key interface {
WriteFile(path string) error
Onion() (*torgo.Onion, error)
ServiceID() string
}
// GenerateKey generates a Tor onion key.
func GenerateKey() (Key, error) {
return generateV3()
}
// ReadFile reads a Tor onion key from file path.
func ReadFile(path string) (Key, error) {
return readV3(path)
}
|