code: func encryptAndPutState(stub shim.ChaincodeStubInterface, ent entities.Encrypter, key string, value []byte) error {
  	// at first we use the supplied entity to encrypt the value
  	ciphertext, err := ent.Encrypt(value)
  	if err != nil {
  		return err
  	}
  
  	return stub.PutState(key, ciphertext)
  }
docs: // encryptAndPutState encrypts the supplied value using the
  // supplied entity and puts it to the ledger associated to
  // the supplied KVS key