decrypt

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

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LocalEncryptNoPwdIterCount = 4
	LocalEncryptIterCount      = 400
	KStrongIterationsCount     = 100000
)

Functions

func AESDecryptLocal

func AESDecryptLocal(encrypted []byte, localKey []byte, msgKey []byte) (decrypted []byte, err error)

func CreateLocalKey

func CreateLocalKey(pass []byte, salt []byte) []byte

CreateLocalKey creates the key used by DecryptLocal. The default password is empty.

func CreateLocalLegacyKey

func CreateLocalLegacyKey(pass []byte, salt []byte) []byte

CreateLocalLegacyKey creates the key used by DecryptLocal. Legacy must use for settings.

func DecryptLocal

func DecryptLocal(encryptedMsg []byte, localKey []byte) (decrypted []byte, err error)

DecryptLocal decrypts a message. localKey should be created at CreateLocalKey.

func PrepareAESoldmtp

func PrepareAESoldmtp(localKey []byte, msgKey []byte) (key []byte, iv []byte)

PrepareAESoldmtp produces key and iv, using localKey and msgKey. localKey comes from CreateLocalKey, msgKey are the first 16 bytes from encrypted message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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