Documentation ¶
Index ¶
- func BHex2Num(str string, n int) int
- func BcdToString(data []byte, ignorePadding ...bool) string
- func Bytes2Str(b []byte) string
- func BytesSplit(data []byte, limit int) [][]byte
- func BytesToString(data []byte) string
- func DecryptOAEP(hash hash.Hash, priv *rsa.PrivateKey, ciphertext []byte, label []byte) ([]byte, error)
- func EncryptOAEP(hash hash.Hash, pub *rsa.PublicKey, msg []byte, label []byte) ([]byte, error)
- func FromBCDTime(bcd []byte) (time.Time, error)
- func GetBitByte(value byte, offset int) bool
- func GetBitUint16(value uint16, offset int) bool
- func GetBitUint32(value uint32, offset int) bool
- func GetGeoPoint(lat uint32, south bool, lng uint32, west bool) (decimal.Decimal, decimal.Decimal)
- func NumToBHex(num, n int) string
- func SetBitByte(value *byte, offset int, set bool)
- func SetBitUint16(value *uint16, offset int, set bool)
- func SetBitUint32(value *uint32, offset int, set bool)
- func Str2Bytes(s string) []byte
- func StringToBCD(s string, size ...int) []byte
- func ToBCDTime(t time.Time) []byte
- type Reader
- func (reader *Reader) Len() int
- func (reader *Reader) Read(size ...int) ([]byte, error)
- func (reader *Reader) ReadBcdTime() (time.Time, error)
- func (reader *Reader) ReadByte() (byte, error)
- func (reader *Reader) ReadString(size ...int) (string, error)
- func (reader *Reader) ReadUint16() (uint16, error)
- func (reader *Reader) ReadUint32() (uint32, error)
- type Writer
- func (writer *Writer) Bytes() []byte
- func (writer *Writer) WritString(str string, size ...int) error
- func (writer *Writer) Write(p []byte, size ...int) *Writer
- func (writer *Writer) WriteBcdTime(t time.Time) *Writer
- func (writer *Writer) WriteByte(b byte) *Writer
- func (writer *Writer) WriteUint16(n uint16) *Writer
- func (writer *Writer) WriteUint32(n uint32) *Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptOAEP ¶
func DecryptOAEP(hash hash.Hash, priv *rsa.PrivateKey, ciphertext []byte, label []byte) ([]byte, error)
使用RSA-OAEP解密
func EncryptOAEP ¶
使用RSA-OAEP加密
func GetBitByte ¶
func GetBitUint16 ¶
func GetBitUint32 ¶
func GetGeoPoint ¶
获取经纬度
func SetBitByte ¶
func SetBitUint16 ¶
func SetBitUint32 ¶
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) ReadUint16 ¶
func (*Reader) ReadUint32 ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) WriteUint16 ¶
func (*Writer) WriteUint32 ¶
Click to show internal directories.
Click to hide internal directories.