Set Userdata[13] and Userdata[14] to the CRC value.
490182
def set_crc(self):
        """"""
        data = self.bytes[6:20]
        crc = int(0)
        for b in data:
            # pylint: disable=unused-variable
            for bit in range(0, 8):
                fb = b & 0x01
                fb = fb ^ 0x01 if (crc & 0x8000) else fb
                fb = fb ^ 0x01 if (crc & 0x4000) else fb
                fb = fb ^ 0x01 if (crc & 0x1000) else fb
                fb = fb ^ 0x01 if (crc & 0x0008) else fb
                crc = ((crc << 1) | fb) & 0xffff
                b = b >> 1
        self._userdata['d13'] = (crc >> 8) & 0xff
        self._userdata['d14'] = crc & 0xff
236350
protected void setUserData(CmsUser user, CmsListItem item) {

        item.set(LIST_COLUMN_LOGIN, user.getName());
        item.set(LIST_COLUMN_NAME, user.getSimpleName());
        item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + user.getOuFqn());
        item.set(LIST_COLUMN_FULLNAME, user.getFullName());
    }
560429
def set_param(self, name: str, v) -> None:
        """"""
        self.params[zlib.crc32(name.encode())] = v
801223
void setUserInfo() {
        String smcDBID = _smc.getSessionDBID();
        if (smcDBID != null && smcDBID.indexOf("::") != -1) {
            try {
                dbid = smcDBID.substring(0, smcDBID.indexOf("::"));
                collectionName = smcDBID.substring(smcDBID.indexOf("::") + 2);
                if (collectionName.indexOf("$V") > 0) {
                    collectionName = collectionName.substring(0, collectionName.indexOf("$V") - 1);
                    String dbConnectVersionName = smcDBID.substring(smcDBID.indexOf("$V") + 2);
                    dbConnectVersion = (int) (new Double(dbConnectVersionName)).doubleValue();
                }
            } catch (Exception e) {
                com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.session.store.db.DatabaseHashMap.setUserInfo", "241", this);
                LoggingUtil.SESSION_LOGGER_WAS.logp(Level.SEVERE, methodClassName, methodNames[SET_USER_INFO], "CommonMessage.exception", e);
            }
        } else
            dbid = smcDBID;

        dbpwd = _smc.getSessionDBPWD();
    }
889350
public UserBuilder withData(String name, Object value) {
        if (this.data == null) {
            this.data = new HashMap<>();
        }

        this.data.put(name, value);
        return this;
    }
187237
def crc(self):
        
        crc = sum(i.crc() for i in self.data.values())
        return crc
1031604
def set_data(self, data):
		""
		if data is None:
			self.data_size = 0
			self.data = None
			return
		self.data_size = len(data)
		# create a string buffer so that null bytes aren't interpreted
		#  as the end of the string
		self.data = ctypes.cast(ctypes.create_string_buffer(data), ctypes.c_void_p)
263995
private function setUser2StepData()
    {
        $user = Auth::User();
        $twoStepAuth = $this->getTwoStepAuthStatus($user->id);
        $authCount = $twoStepAuth->authCount;
        $this->_user = $user;
        $this->_twoStepAuth = $twoStepAuth;
        $this->_authCount = $authCount;
        $this->_authStatus = $twoStepAuth->authStatus;
        $this->_remainingAttempts = config('laravel2step.laravel2stepExceededCount') - $authCount;
    }
952607
def crc7(data):
    
    crc = 0

    for c in data:
        crc = CRC7_TABLE[crc ^ c]

    return crc
365714
def crc_update(crc, data):
    
    if type(data) != array.array or data.itemsize != 1:
        buf = array.array("B", data)
    else:
        buf = data
    crc = crc ^ _MASK
    for b in buf:
        table_index = (crc ^ b) & 0xff
        crc = (CRC_TABLE[table_index] ^ (crc >> 8)) & _MASK
    return crc ^ _MASK
178374
def _crc32(self, ch, crc):
        """"""
        return ((crc >> 8) & 0xffffff) ^ self.crctable[(crc ^ ord(ch)) & 0xff]
101043
private function setupUserData($userData = array())
	{
		$returnable = array();

		foreach($userData as $key => $value)
		{
			switch($key)
			{
				case 'URL':
					// Remove shop domain
					$url = str_replace($this->_API['SHOP_DOMAIN'], '', $value);

					// Verify it contains /admin/
					if (strpos($url, '/admin/') !== 0)
					{
						$url = str_replace('//', '/', '/admin/' . preg_replace('/\/?admin\/?/', '', $url));
					}
					$returnable[$key] = $url;
					break;

				default:
					$returnable[$key] = $value;

			}
		}

		return $returnable;
	}
1157021
protected static final Map<String, ArrayList<String>> parseUserData(String userData) {
        int tokenLen = userData.length();
        int numOfAttribs = 1; // default has "user" (u) attribute
        int lastDelim = 0;
        int i = 0;
        Map<String, ArrayList<String>> attribs = new HashMap<String, ArrayList<String>>();

        for (i = 0; i < tokenLen; i++) {
            if ((userData.charAt(i) == USER_DATA_DELIM) && (userData.charAt(i - 1) != '\\')) {
                numOfAttribs++;
                String data = userData.substring(lastDelim, i);
                lastDelim = i + 1;
                addAttributes(data, attribs);
            }
        }

        // add the last element
        String data = userData.substring(lastDelim, tokenLen);
        addAttributes(data, attribs);

        return attribs;
    }
540969
def _set(self, value):
        '''
        

        '''
        user = self.USER
        try:
            uid = pwd.getpwnam(user).pw_uid
        except KeyError:
            log.info('User does not exist')
            result = {}
            result['retcode'] = 1
            result['stdout'] = 'User {0} does not exist'.format(user)
            return result

        cmd = self.gsetting_command + ['set', self.SCHEMA, self.KEY, value]
        environ = {}
        environ['XDG_RUNTIME_DIR'] = '/run/user/{0}'.format(uid)
        result = __salt__['cmd.run_all'](cmd, runas=user, env=environ, python_shell=False)
        return result
1271392
public void updateCRC() {
        this.crc32 = 0;
        CRC32 crcAlg = new CRC32();
        crcAlg.update(this.toByteArray());

        this.crc32 = (int) crcAlg.getValue();
    }
855126
def crc16_kermit(data, crc=0):
    """"""
    tab = CRC16_KERMIT_TAB  # minor optimization (now in locals)
    for byte in six.iterbytes(data):
        tbl_idx = (crc ^ byte) & 0xff
        crc = (tab[tbl_idx] ^ (crc >> 8)) & 0xffff
    return crc & 0xffff
159934
def _crc16(data, crc, table):
    
    bytes_to_int = lambda x: ord(x) if sys.version_info.major == 2 else x
    for byte in data:
        crc = ((crc << 8) & 0xff00) ^ table[((crc >> 8) & 0xff) ^ bytes_to_int(byte)]
    return crc & 0xffff