auth

package
v0.0.0-...-7638cb1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

package auth provides methods to implement managed instances auth support

Index

Constants

View Source
const (

	// KeyType returns the RSA Key Type
	KeyType = "Rsa"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RsaKey

type RsaKey struct {
	// contains filtered or unexported fields
}

func CreateKeypair

func CreateKeypair() (rsaKey RsaKey, err error)

CreateKeypair creates a new RSA keypair

func DecodePrivateKey

func DecodePrivateKey(privateKey string) (rsaKey RsaKey, err error)

DecodePrivateKey decodes a private key from a base 64 DER encoded string

func (*RsaKey) EncodePrivateKey

func (rsaKey *RsaKey) EncodePrivateKey() (privateKey string, err error)

EncodePrivateKey encodes a private key to a base 64 DER encoded string

func (*RsaKey) EncodePublicKey

func (rsaKey *RsaKey) EncodePublicKey() (publicKey string, err error)

EncodePublicKey encodes a public key to a base 64 DER encoded string

func (*RsaKey) Sign

func (rsaKey *RsaKey) Sign(message string) (signature string, err error)

Sign creates the signature for a message

func (*RsaKey) VerifySignature

func (rsaKey *RsaKey) VerifySignature(message string, signature string) (err error)

VerifySignature verifies the signature of a message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL