Base64 implements the Encoder interface.
()
| 99 | |
| 100 | // Base64 implements the Encoder interface. |
| 101 | func (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. |
| 110 | func (p *Protected) UnmarshalJSON(b []byte) error { |
nothing calls this directly
no test coverage detected