func PackageAuthenticationAll(checks ...PackageAuthentication) PackageAuthentication {
	return packageAuthenticationAll(checks)
}
PackageAuthenticationAll combines several authentications together into a
single check value, which passes only if all of the given ones pass.

The checks are processed in the order given, so a failure of an earlier
check will prevent execution of a later one.

The returned result is from the last authentication, so callers should
take care to order the authentications such that the strongest is last.

The returned object also implements the AcceptableHashes method from
interface PackageAuthenticationHashes, returning the hashes from the
last of the given checks that indicates at least one acceptable hash,
or no hashes at all if none of the constituents indicate any. The result
may therefore be incomplete if there is more than one check that can provide
hashes and they disagree about which hashes are acceptable.
package getproviders
import (
	"bufio"
	"bytes"
	"crypto/sha256"
	"encoding/hex"
	"fmt"
	"log"
	"strings"
	"golang.org/x/crypto/openpgp"
	openpgpArmor "golang.org/x/crypto/openpgp/armor"
	openpgpErrors "golang.org/x/crypto/openpgp/errors"
)
type packageAuthenticationResult int
const (
	verifiedChecksum packageAuthenticationResult = iota
	officialProvider
	partnerProvider
	communityProvider
)
type PackageAuthenticationResult struct {
	result packageAuthenticationResult
	KeyID  string
}
func (t *PackageAuthenticationResult) String() string {
	if t == nil {
		return "unauthenticated"
	}
	return []string{
		"verified checksum",
		"signed by HashiCorp",
		"signed by a HashiCorp partner",
		"self-signed",
	}[t.result]
}
func (t *PackageAuthenticationResult) SignedByHashiCorp() bool {
	if t == nil {
		return false
	}
	if t.result == officialProvider {
		return true
	}
	return false
}
func (t *PackageAuthenticationResult) SignedByAnyParty() bool {
	if t == nil {
		return false
	}
	if t.result == officialProvider || t.result == partnerProvider || t.result == communityProvider {
		return true
	}
	return false
}
func (t *PackageAuthenticationResult) ThirdPartySigned() bool {
	if t == nil {
		return false
	}
	if t.result == partnerProvider || t.result == communityProvider {
		return true
	}
	return false
}
type SigningKey struct {
	ASCIIArmor     string `json:"ascii_armor"`
	TrustSignature string `json:"trust_signature"`
}
type PackageAuthentication interface {
	AuthenticatePackage(localLocation PackageLocation) (*PackageAuthenticationResult, error)
}
type PackageAuthenticationHashes interface {
	PackageAuthentication
	AcceptableHashes() []Hash
}
type packageAuthenticationAll []PackageAuthentication