Documentation ¶
Index ¶
- Variables
- func CheckSumHex(data []byte) string
- func DecodeQuoteString(str string) ([]byte, error)
- func DecodeQuoteStringWithLen(str string, expectedLen int) ([]byte, error)
- func DecodeString(str string) ([]byte, error)
- func DecodeStringWithLen(str string, expectedLen int) ([]byte, error)
- func EncodeToQuoteString(bytes []byte) string
- func EncodeToString(bytes []byte) string
- func MarshalCBOR(v any) ([]byte, error)
- func MarshalJSONData(data []byte) json.RawMessage
- func MustMarshalCBOR(v any) []byte
- func MustMarshalJSON(v any) []byte
- func Sum256(msg []byte) []byte
- func UnmarshalCBOR(data []byte, v any) error
- func UnmarshalCBORWithLen(data []byte, expectedLen int) ([]byte, error)
- func UnmarshalJSONData(data json.RawMessage) []byte
- func ValidCBOR(data []byte) error
- type RawData
Constants ¶
This section is empty.
Variables ¶
View Source
var DecMode, _ = DecOpts.DecMode()
View Source
var DecOpts = cbor.DecOptions{
DupMapKey: cbor.DupMapKeyEnforcedAPF,
IndefLength: cbor.IndefLengthForbidden,
MaxArrayElements: 100_000,
MaxMapPairs: 1_000_000,
UTF8: cbor.UTF8DecodeInvalid,
}
View Source
var EncMode, _ = EncOpts.EncMode()
View Source
var EncOpts = cbor.EncOptions{
Sort: cbor.SortBytewiseLexical,
Time: cbor.TimeRFC3339Nano,
ShortestFloat: cbor.ShortestFloat16,
NaNConvert: cbor.NaNConvert7e00,
InfConvert: cbor.InfConvertFloat16,
IndefLength: cbor.IndefLengthForbidden,
BigIntConvert: cbor.BigIntConvertNone,
}
Functions ¶
func CheckSumHex ¶
func DecodeQuoteString ¶
func DecodeString ¶
DecodeString [str] to bytes from raw base64url.
func EncodeToQuoteString ¶
func EncodeToString ¶
EncodeToString bytes to a string using raw base64url format.
func MarshalCBOR ¶
func MarshalJSONData ¶
func MarshalJSONData(data []byte) json.RawMessage
func MustMarshalCBOR ¶
func MustMarshalJSON ¶ added in v0.1.0
func UnmarshalCBOR ¶
func UnmarshalJSONData ¶
func UnmarshalJSONData(data json.RawMessage) []byte
Types ¶
Click to show internal directories.
Click to hide internal directories.