Documentation
¶
Index ¶
- func DecodeBase64(dataBase64 []byte) ([]byte, error)
- func DoesExist(filePath string) bool
- func EncodeBase64(data []byte) []byte
- func Get32BitMaskFromCIDR(netmask int) string
- func GetInfohashByPubKey(pub *rsa.PublicKey) (string, error)
- func GetMutualMPipePort(pubKeyHash string, peerPubKeyHash string) int
- func LoadKey(privateKeyPath string) *rsa.PrivateKey
- func NewAesCrypter(key []byte) *aesCrypter
- type SymmetricCrypter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBase64 ¶
func EncodeBase64 ¶
func Get32BitMaskFromCIDR ¶
** helper function for converting a integer such as 24 net-mask to its 32-bit ** equivalent such as 255.255.255.0
func GetMutualMPipePort ¶
Return an integer that is deterministically calculated from two pubkeyhashes The resulting integer is used as the mpipe port between the two pubkeyhash owners as a form of psuedo port negotiation
func LoadKey ¶
func LoadKey(privateKeyPath string) *rsa.PrivateKey
func NewAesCrypter ¶
func NewAesCrypter(key []byte) *aesCrypter
Types ¶
Click to show internal directories.
Click to hide internal directories.