blecrypto

package
v0.0.0-...-1c51112 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BLECrypto

type BLECrypto struct {
	// contains filtered or unexported fields
}

BLECrypto is a container for all of the BLE crypto

func New

func New() *BLECrypto

New returns a BLECrypto with a populated keyset

func (*BLECrypto) DecryptMessage

func (b *BLECrypto) DecryptMessage(msg []byte) ([]byte, error)

DecryptMessage decrypts an incoming message

func (*BLECrypto) Encrypt

func (b *BLECrypto) Encrypt(msg []byte) ([]byte, error)

Encrypt encrypts an incoming message

func (*BLECrypto) GetRemotePublicKey

func (b *BLECrypto) GetRemotePublicKey() [32]uint8

GetRemotePublicKey returns the public key

func (*BLECrypto) SetNonces

func (b *BLECrypto) SetNonces(msg *rts.RtsNonceMessage) error

SetNonces populates the nonces

func (*BLECrypto) SetPin

func (b *BLECrypto) SetPin(pin string) error

SetPin configures the hashes based on the pin entered

func (*BLECrypto) SetRemotePublicKey

func (b *BLECrypto) SetRemotePublicKey(msg *rts.RtsConnRequest) error

SetRemotePublicKey populates the remote public key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL