kubernetes/vendor/gopkg.in/square/go-jose.v2/shared.go

type KeyAlgorithm

type SignatureAlgorithm

type ContentEncryption

type CompressionAlgorithm

type ContentType

var ErrCryptoFailure

var ErrUnsupportedAlgorithm

var ErrUnsupportedKeyType

var ErrInvalidKeySize

var ErrNotSupported

var ErrUnprotectedNonce

const ED25519

const RSA1_5

const RSA_OAEP

const RSA_OAEP_256

const A128KW

const A192KW

const A256KW

const DIRECT

const ECDH_ES

const ECDH_ES_A128KW

const ECDH_ES_A192KW

const ECDH_ES_A256KW

const A128GCMKW

const A192GCMKW

const A256GCMKW

const PBES2_HS256_A128KW

const PBES2_HS384_A192KW

const PBES2_HS512_A256KW

const EdDSA

const HS256

const HS384

const HS512

const RS256

const RS384

const RS512

const ES256

const ES384

const ES512

const PS256

const PS384

const PS512

const A128CBC_HS256

const A192CBC_HS384

const A256CBC_HS512

const A128GCM

const A192GCM

const A256GCM

const NONE

const DEFLATE

type HeaderKey

const HeaderType

const HeaderContentType

const headerAlgorithm

const headerEncryption

const headerCompression

const headerCritical

const headerAPU

const headerAPV

const headerEPK

const headerIV

const headerTag

const headerX5c

const headerJWK

const headerKeyID

const headerNonce

const headerB64

const headerP2C

const headerP2S

var supportedCritical

type rawHeader

type Header

// Certificates verifies & returns the certificate chain present
// in the x5c header field of a message, if one was present. Returns
// an error if there was no x5c header present or the chain could
// not be validated with the given verify options.
func (h Header) Certificates(opts x509.VerifyOptions) ([][]*x509.Certificate, error) {}

func (parsed rawHeader) set(k HeaderKey, v interface{}

// getString gets a string from the raw JSON, defaulting to "".
func (parsed rawHeader) getString(k HeaderKey) string {}

// getByteBuffer gets a byte buffer from the raw JSON. Returns (nil, nil) if
// not specified.
func (parsed rawHeader) getByteBuffer(k HeaderKey) (*byteBuffer, error) {}

// getAlgorithm extracts parsed "alg" from the raw JSON as a KeyAlgorithm.
func (parsed rawHeader) getAlgorithm() KeyAlgorithm {}

// getSignatureAlgorithm extracts parsed "alg" from the raw JSON as a SignatureAlgorithm.
func (parsed rawHeader) getSignatureAlgorithm() SignatureAlgorithm {}

// getEncryption extracts parsed "enc" from the raw JSON.
func (parsed rawHeader) getEncryption() ContentEncryption {}

// getCompression extracts parsed "zip" from the raw JSON.
func (parsed rawHeader) getCompression() CompressionAlgorithm {}

func (parsed rawHeader) getNonce() string {}

// getEPK extracts parsed "epk" from the raw JSON.
func (parsed rawHeader) getEPK() (*JSONWebKey, error) {}

// getAPU extracts parsed "apu" from the raw JSON.
func (parsed rawHeader) getAPU() (*byteBuffer, error) {}

// getAPV extracts parsed "apv" from the raw JSON.
func (parsed rawHeader) getAPV() (*byteBuffer, error) {}

// getIV extracts parsed "iv" from the raw JSON.
func (parsed rawHeader) getIV() (*byteBuffer, error) {}

// getTag extracts parsed "tag" from the raw JSON.
func (parsed rawHeader) getTag() (*byteBuffer, error) {}

// getJWK extracts parsed "jwk" from the raw JSON.
func (parsed rawHeader) getJWK() (*JSONWebKey, error) {}

// getCritical extracts parsed "crit" from the raw JSON. If omitted, it
// returns an empty slice.
func (parsed rawHeader) getCritical() ([]string, error) {}

// getS2C extracts parsed "p2c" from the raw JSON.
func (parsed rawHeader) getP2C() (int, error) {}

// getS2S extracts parsed "p2s" from the raw JSON.
func (parsed rawHeader) getP2S() (*byteBuffer, error) {}

// getB64 extracts parsed "b64" from the raw JSON, defaulting to true.
func (parsed rawHeader) getB64() (bool, error) {}

// sanitized produces a cleaned-up header object from the raw JSON.
func (parsed rawHeader) sanitized() (h Header, err error) {}

func parseCertificateChain(chain []string) ([]*x509.Certificate, error) {}

func (dst rawHeader) isSet(k HeaderKey) bool {}

// Merge headers from src into dst, giving precedence to headers from l.
func (dst rawHeader) merge(src *rawHeader) {}

// Get JOSE name of curve
func curveName(crv elliptic.Curve) (string, error) {}

// Get size of curve in bytes
func curveSize(crv elliptic.Curve) int {}

func makeRawMessage(b []byte) *json.RawMessage {}