You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: encryptor.go
    path of file: ./repos/wechat/miniprogram/encryptor
    
    the code of the file until where you have to start completion: package encryptor

import (
	"crypto/aes"
	"crypto/cipher"
	"encoding/base64"
	"encoding/json"
	"errors"
	"fmt"

	"github.com/silenceper/wechat/v2/miniprogram/context"
)

// Encryptor struct
type Encryptor struct {
	*context.Context
}

// NewEncryptor 实例
func NewEncryptor(context *conte
    
func (encryptor *Encryptor) Decrypt(sessionKey, encryptedData, iv string) (*PlainData, error) {
	cipherText, err := GetCipherText(sessionKey, encryptedData, iv)
	if err != nil {
		return nil, err
	}
	var plainData PlainData
	err = json.Unmarshal(cipherText, &plainData)
	if err != nil {
		return nil, err
	}
	if plainData.Watermark.AppID != encryptor.AppID {
		return nil, ErrAppIDNotMatch
	}
	return &plainData, nil
}