jscrypt

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(data string, password string) (string, error)

解密

func DefaultEvpKDF

func DefaultEvpKDF(password []byte, salt []byte) (key []byte, iv []byte, err error)

func Encrypt

func Encrypt(data string, password string) (string, error)

加密

func EvpKDF

func EvpKDF(password []byte, salt []byte, keySize int, iterations int, hashAlgorithm string) ([]byte, error)

func GenerateBw

func GenerateBw(bt int64) string

func GenerateN

func GenerateN(t int64) string

func PKCS5Padding

func PKCS5Padding(src []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(src []byte) []byte

Types

type CryptoJsData

type CryptoJsData struct {
	Ct string `json:"ct"`
	Iv string `json:"iv"`
	S  string `json:"s"`
}

Jump to

Keyboard shortcuts

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