Documentation ¶
Index ¶
Constants ¶
View Source
const ( // P256 curve P256 string = "P-256" // P384 curve P384 string = "P-384" // P521 curve P521 string = "P-521" )
View Source
const ( EC = "EC" // Elliptic Curve InvalidKeyType = "" // Invalid KeyType OctetSeq = "oct" // Octet sequence (used to represent symmetric keys) RSA = "RSA" // RSA )
Supported values for KeyType
Variables ¶
This section is empty.
Functions ¶
func GenerateTLSCertificate ¶ added in v0.5.0
func GenerateTLSCertificate(privateKey PrivateKey) (*tls.Certificate, error)
GenerateTLSCertificate for TLS serverset
Types ¶
type PrivateKey ¶
type PrivateKey string
func GenerateEd25519PrivateKey ¶ added in v0.5.0
func GenerateEd25519PrivateKey() (PrivateKey, error)
func NewPrivateKey ¶
func NewPrivateKey(seed []byte) PrivateKey
func (PrivateKey) Bytes ¶ added in v0.5.0
func (i PrivateKey) Bytes() []byte
func (PrivateKey) IsEmpty ¶ added in v0.5.0
func (i PrivateKey) IsEmpty() bool
func (PrivateKey) PublicKey ¶
func (i PrivateKey) PublicKey() PublicKey
func (PrivateKey) Sign ¶ added in v0.5.0
func (i PrivateKey) Sign(message []byte) []byte
func (PrivateKey) String ¶ added in v0.5.0
func (i PrivateKey) String() string
Click to show internal directories.
Click to hide internal directories.