nip44

package
v0.34.13 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MinPlaintextSize = 0x0001 // 1b msg => padded to 32b
	MaxPlaintextSize = 0xffff // 65535 (64kb-1) => padded to 64kb
)

Variables

View Source
var WithCustomSalt = WithCustomNonce

Deprecated: use WithCustomNonce instead of WithCustomSalt, so the naming is less confusing

Functions

func Decrypt

func Decrypt(b64ciphertextWrapped string, conversationKey []byte) (string, error)

func Encrypt

func Encrypt(plaintext string, conversationKey []byte, applyOptions ...func(opts *encryptOptions)) (string, error)

func GenerateConversationKey added in v0.31.0

func GenerateConversationKey(pub string, sk string) ([]byte, error)

func WithCustomNonce added in v0.34.5

func WithCustomNonce(salt []byte) func(opts *encryptOptions)

Types

This section is empty.

Jump to

Keyboard shortcuts

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