Documentation ¶
Index ¶
- func Decrypt(encryptedBytes []byte, privateKey *rsa.PrivateKey) []byte
- func Encrypt(message string, publicKey *rsa.PublicKey) []byte
- func ExportRSAPrivateKey(privkey *rsa.PrivateKey) string
- func ExportRSAPublicKey(pubkey *rsa.PublicKey) string
- func GenerateRSAKeyPair() (*rsa.PrivateKey, *rsa.PublicKey)
- func GenerateVRFKeys() ([]byte, []byte, error)
- func GetKey(key string) (string, error)
- func GetKeyBytes(key string) ([]byte, error)
- func GetMagicSeed() ([]byte, error)
- func GetPeers() ([]peerpb.Peer, error)
- func HashSHA256(content string) [32]byte
- func ParseRSAPrivateKey(privPEM string) (*rsa.PrivateKey, error)
- func ParseRSAPublicKey(pubPEM string) (*rsa.PublicKey, error)
- func Prove(message []byte) ([]byte, []byte, error)
- func SaveKey(content string, key string) (bool, error)
- func SaveKeyBytes(content []byte, key string) (bool, error)
- func SavePeer(peer peerpb.Peer) (bool, error)
- func Sign(message string, privateKey rsa.PrivateKey) (string, string)
- func Verify(checksum string, signature string, publicKey *rsa.PublicKey) bool
- func VerifyVRF(message []byte, proof []byte) (bool, error)
- func WriteToFile(content string, filename string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportRSAPrivateKey ¶
func ExportRSAPrivateKey(privkey *rsa.PrivateKey) string
func ExportRSAPublicKey ¶
func GenerateRSAKeyPair ¶
func GenerateRSAKeyPair() (*rsa.PrivateKey, *rsa.PublicKey)
func GenerateVRFKeys ¶
func GetKeyBytes ¶
func GetMagicSeed ¶
func HashSHA256 ¶
func ParseRSAPrivateKey ¶
func ParseRSAPrivateKey(privPEM string) (*rsa.PrivateKey, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.