Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type I2PAddr ¶
type I2PAddr string
I2PAddr represents an I2P destination, almost equivalent to an IP address. This is the humongously huge base64 representation of such an address, which really is just a pair of public keys and also maybe a certificate. (I2P hides the details of exactly what it is. Read the I2P specifications for more info.)
func FiveHundredAs ¶
func FiveHundredAs() I2PAddr
func NewI2PAddrFromBytes ¶
Creates a new I2P address from a byte array. The inverse of ToBytes().
func NewI2PAddrFromString ¶
Creates a new I2P address from a base64-encoded string. Checks if the address addr is in correct format. (If you know for sure it is, use I2PAddr(addr).)
func (I2PAddr) Base32 ¶
Returns the *.b32.i2p address of the I2P address. It is supposed to be a somewhat human-manageable 64 character long pseudo-domain name equivalent of the 516+ characters long default base64-address (the I2PAddr format). It is not possible to turn the base32-address back into a usable I2PAddr without performing a Lookup(). Lookup only works if you are using the I2PAddr from which the b32 address was generated.
func (I2PAddr) DestHash ¶
func (addr I2PAddr) DestHash() (h I2PDestHash)
type I2PDestHash ¶
type I2PDestHash [32]byte
an i2p destination hash, the .b32.i2p address if you will
func DestHashFromString ¶
func DestHashFromString(str string) (dhash I2PDestHash, err error)
create a desthash from a string b32.i2p address
func (I2PDestHash) Hash ¶
func (h I2PDestHash) Hash() string
get base64 representation of i2p dest sha256 hash(the 44-character one)
func (I2PDestHash) String ¶
func (h I2PDestHash) String() string
get string representation of i2p dest hash(base32 version)
type I2PKeys ¶
type I2PKeys struct { Address I2PAddr // only the public key Both string // both public and private keys }
The public and private keys associated with an I2P destination. I2P hides the details of exactly what this is, so treat them as blobs, but generally: One pair of DSA keys, one pair of ElGamal keys, and sometimes (almost never) also a certificate. String() returns you the full content of I2PKeys and Addr() returns the public keys.
func LoadKeys ¶ added in v0.32.32
load keys from non-standard format by specifying a text file. If the file does not exist, generate keys, otherwise, fail closed.
func LoadKeysIncompat ¶
load keys from non standard format