go-http-peering: forge.cadoles.com/wpetit/go-http-peering/crypto Index | Files

package crypto

import "forge.cadoles.com/wpetit/go-http-peering/crypto"

Index

Package Files

pem.go rsa.go

func CreateRSAKey Uses

func CreateRSAKey(bits int) (*rsa.PrivateKey, error)

func CreateServerToken Uses

func CreateServerToken(privateKey *rsa.PrivateKey, issuer string, peerID peering.PeerID) (string, error)

func DecodePEMEncryptedPrivateKey Uses

func DecodePEMEncryptedPrivateKey(key []byte, passphrase []byte) (*rsa.PrivateKey, error)

func DecodePEMToPublicKey Uses

func DecodePEMToPublicKey(pem []byte) (crypto.PublicKey, error)

func EncodePrivateKeyToEncryptedPEM Uses

func EncodePrivateKeyToEncryptedPEM(key *rsa.PrivateKey, passphrase []byte) ([]byte, error)

func EncodePublicKeyToPEM Uses

func EncodePublicKeyToPEM(key crypto.PublicKey) ([]byte, error)

Package crypto imports 9 packages (graph) and is imported by 2 packages. Updated 2019-05-21. Refresh now. Tools for package owners.