Versions in this module Expand all Collapse all v1 v1.0.0 Aug 16, 2022 Changes in this version + var ErrInvalidKeyLen = errors.New("invalid keylen") + var ErrUnsupportedAlgorithm = errors.New("unsupported algorithm") + var ErrUnsupportedHash = errors.New("unsupported hash") + type Crypto struct + func New() *Crypto + func (c *Crypto) Ecdh(ctx context.Context, algorithm string, privateKey, publicKey goja.ArrayBuffer) (interface{}, error) + func (c *Crypto) GenerateKeyPair(ctx context.Context, algorithm string, seedIn interface{}) (*KeyPair, error) + func (c *Crypto) Hkdf(ctx context.Context, hash string, secretIn, saltIn, infoIn interface{}, ...) (interface{}, error) + func (c *Crypto) Pbkdf2(ctx context.Context, passwordIn, saltIn interface{}, iter, keylen int, ...) (interface{}, error) + func (c *Crypto) RsaEncryptOAEP(ctx context.Context, publicKey string, encryptData string, hash string) (string, error) + func (c *Crypto) RsaPublicEncryptWithBase64PublicKey(ctx context.Context, publicKey string, encryptData string) (string, error) + func (c *Crypto) RsaPublicEncryptWithPublicKey(ctx context.Context, publicKey string, encryptData string) (string, error) + type KeyPair struct + PrivateKey goja.ArrayBuffer + PublicKey goja.ArrayBuffer