MCPcopy Create free account
hub / github.com/SermoDigital/jose / Base64

Method Base64

header.go:101–107  ·  view source on GitHub ↗

Base64 implements the Encoder interface.

()

Source from the content-addressed store, hash-verified

99
100// Base64 implements the Encoder interface.
101func (p Protected) Base64() ([]byte, error) {
102 b, err := json.Marshal(map[string]interface{}(p))
103 if err != nil {
104 return nil, err
105 }
106 return Base64Encode(b), nil
107}
108
109// UnmarshalJSON implements json.Unmarshaler for Protected.
110func (p *Protected) UnmarshalJSON(b []byte) error {

Callers

nothing calls this directly

Calls 1

Base64EncodeFunction · 0.85

Tested by

no test coverage detected