chefcrypto

package
Version: v0.11.10 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package chefcrypto bundles up crytographic routines for goairdi. DEPRECATED: This library has been moved to github.com/ctdk/chefcrypto, and will be removed from goiardi with a later release.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth12HeaderVerify

func Auth12HeaderVerify(pkPem string, hashed, sig []byte) error

Auth12HeaderVerify verifies the newer version 1.2 Chef authentication protocol headers.

func GenerateRSAKeys

func GenerateRSAKeys() (string, string, error)

GenerateRSAKeys creates a pair of private and public keys for a client.

func GenerateSalt

func GenerateSalt() ([]byte, error)

GenerateSalt makes a new salt for hashing a password.

func HashPasswd

func HashPasswd(passwd string, salt []byte) (string, error)

HashPasswd SHA512 hashes a password string with the provided salt.

func HeaderDecrypt

func HeaderDecrypt(pkPem string, data string) ([]byte, error)

HeaderDecrypt decrypts the encrypted header with the client or user's public key for validating requests. This function is informed by chef-golang's privateDecrypt function.

func SignTextBlock added in v0.8.0

func SignTextBlock(textBlock string, privKey *rsa.PrivateKey) (string, error)

SignTextBlock signs a block of text using the provided private RSA key. Used by shovey to sign requests that the client can verify.

func ValidatePublicKey

func ValidatePublicKey(publicKey interface{}) (bool, error)

ValidatePublicKey checks that the provided public key is valid.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL