func (a AwsKms) crypto(payload []byte, projectid, locationid, keyringid,
	cryptokeyid, keyname string, encrypt bool) (resultText []byte, err error) {

	svc := kms.New(session.New(&aws.Config{
		Region: aws.String("eu-west-1")}))
	if encrypt {
		resultText, err = awsKMSEncrypt(payload, keyname, svc)
	} else {
		resultText, err = awsKMSDecrypt(payload, svc)
	}
	return
}
// uses aws kms to either encrypt or decrypt a byte slice
uses aws kms to either encrypt or decrypt a byte slice
// uses aws kms to either encrypt or decrypt a byte slice
func (a AwsKms) crypto(payload []byte, projectid, locationid, keyringid,
	cryptokeyid, keyname string, encrypt bool) (resultText []byte, err error) {
	svc := kms.New(session.New(&aws.Config{
		Region: aws.String("eu-west-1")}))
	if encrypt {
		resultText, err = awsKMSEncrypt(payload, keyname, svc)
	} else {
		resultText, err = awsKMSDecrypt(payload, svc)
	}
	return
}
func ( a AwsKms ) crypto ( payload [ ] byte , projectid , locationid , keyringid , cryptokeyid , keyname string , encrypt bool ) ( resultText [ ] byte , err error ) { svc := kms . New ( session . New ( & aws . Config { Region : aws . String ( " " ) } ) ) if encrypt { resultText , err = awsKMSEncrypt ( payload , keyname , svc ) } else { resultText , err = awsKMSDecrypt ( payload , svc ) } return }
uses aws kms to either encrypt or decrypt a byte slice
uses aws kms to either encrypt or decrypt a byte slice