{"modulePath":"github.com/Coding/drone","version":"v0.4.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package crypto\n\n## Constants\n\n```go\nconst (\n\tRSA_BITS     = 2048 // Default number of bits in an RSA key\n\tRSA_BITS_MIN = 768  // Minimum number of bits in an RSA key\n)\n```\n\n## Functions\n\n```go\nfunc Encrypt(in, privKey string) (string, error)\n```\nEncrypt encrypts a secret string.\n\n```go\nfunc GeneratePrivateKey() (*rsa.PrivateKey, error)\n```\nhelper function to generate an RSA Private Key.\n\n```go\nfunc MarshalPrivateKey(private *rsa.PrivateKey) []byte\n```\nhelper function that marshalls an RSA Private Key to a PEM encoded file.\n\n```go\nfunc MarshalPublicKey(public *rsa.PublicKey) []byte\n```\nhelper function that marshalls an RSA Public Key to an SSH .authorized\\_keys format\n\n```go\nfunc Rand() string\n```\nRand generates a 32-bit random string.\n\n```go\nfunc UnmarshalPrivateKey(private []byte) *rsa.PrivateKey\n```\nUnmarshalPrivateKey is a helper function that unmarshals a PEM bytes to an RSA Private Key\n\n","path":"github.com/Coding/drone/shared/crypto","name":"crypto","synopsis":"","isRedistributable":true}
