Documentation
¶
Index ¶
- Constants
- func BigUIntFromBytes(b []byte) (s *big.Int)
- func BytesFromBigUInt(s *big.Int, l uint32) (out []byte)
- func BytesFromInt64(i int64) (out []byte)
- func BytesFromUint32(i uint32) (out []byte)
- func BytesFromUint64(i uint64) (out []byte)
- func DecodeBigUInt(b []byte) (bui *big.Int, l uint32, err error)
- func DecodeBytes(b []byte) (db []byte, err error)
- func DecodeListWithPadding(b []byte) (encoded [][]byte, err error)
- func EncodeBigUInt(bui *big.Int, l uint32) (out []byte)
- func EncodeBytes(b []byte) (out []byte)
- func Int64FromBytes(b []byte) (i int64)
- func Uint32FromBytes(b []byte) (i uint32)
- func Uint64FromBytes(b []byte) (i uint64)
- type Decoder
- type Encoder
- type Error
Constants ¶
View Source
const ( ErrEncoding = Error("encoding/decoding error") ErrCrypt = Error("encryption error") )
Variables ¶
This section is empty.
Functions ¶
func BigUIntFromBytes ¶
func BytesFromInt64 ¶
func BytesFromUint32 ¶
func BytesFromUint64 ¶
func DecodeBytes ¶
func DecodeListWithPadding ¶ added in v0.3.0
DecodeListWithPadding decodes the first encoded list in b, ignoring any trailing bytes (reference Encoded.decodeListWithPadding). Olvid pads some plaintexts (e.g. an encrypted device name) up to a block boundary with trailing zeros; the list is self-delimiting, so the padding is discarded.
func EncodeBytes ¶
func Int64FromBytes ¶
func Uint32FromBytes ¶
func Uint64FromBytes ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.