Sets the device_key of this DeviceData.
        The fingerprint of the device certificate.

        :param device_key: The device_key of this DeviceData.
        :type: str
1345
def device_key(self, device_key):
        
        if device_key is not None and len(device_key) > 512:
            raise ValueError("Invalid value for `device_key`, length must be less than or equal to `512`")

        self._device_key = device_key
1344149
public FingerprintDialog callback(FingerprintDialogSecureCallback fingerprintDialogSecureCallback, String KEY_NAME){
        this.fingerprintDialogSecureCallback = fingerprintDialogSecureCallback;
        this.fingerprint.callback(fingerprintSecureCallback, KEY_NAME);
        return this;
    }
164413
function Device(key, params) {
  var p = params || {};
  // The primary key of the device [String]
  this.key = key;

  // Human readable name of the device [String] EG - "My Device"
  this.name = p.name || "";

  // Indexable attributes. Useful for grouping related Devices.
  // EG - {location: '445-w-Erie', model: 'TX75', region: 'Southwest'}
  this.attributes = p.attributes || {};
  this.sensors = p.sensors || [];
}
526786
def set_tare(self, tare):
        
        response = self.api_interface.set_device_state(self, {"tare": tare})
        self._update_state_from_response(response)
525088
def _set_attributes(self, **kwargs):
        '''
        '''

        try:
            self.devices = kwargs['devices'][:]
            self.name = kwargs['device_group_name']
            self.type = kwargs['device_group_type']
            self.partition = kwargs['device_group_partition']
        except KeyError as ex:
            raise MissingRequiredDeviceGroupParameter(ex)
1372868
def key(self, key, strictkey=None):
        
        return self._select(self._pointer.key(key, strictkey))
571181
void setDeviceId(int nDeviceId) {
        synchronized (LOCK) {
            // Move this instance inside the HashMaps
            INSTANCES.get(connection()).remove(getDeviceId());
            INSTANCES.get(connection()).put(nDeviceId, this);

            this.deviceId = nDeviceId;
        }
    }
1042151
def reset_key(self):
        
        new_key = self.client.reset_app_key(self.get('uuid'))
        self.data['key'] = new_key
        return new_key
735477
def set_state(self, state):
        
        values = {"desired_state": {"powered": state}}
        response = self.api_interface.set_device_state(self, values)
        self._update_state_from_response(response)
965508
def device_info(self, device_id=None):
        
        if device_id is None:
            device_id = self.device_id
        return get_device_info(self.corsair_sdk, device_id)
270311
def pubkey(self, identity, ecdh=False):
        """"""
        with self.device:
            pubkey = self.device.pubkey(ecdh=ecdh, identity=identity)
        return formats.decompress_pubkey(
            pubkey=pubkey, curve_name=identity.curve_name)
1087012
func (s *NewDeviceMetadataType) SetDeviceKey(v string) *NewDeviceMetadataType {
	s.DeviceKey = &v
	return s
}
906497
def set_device(self, device_name):
    
    device_name = unify_device_name(device_name)
    self.device_name = device_name
    for layer in self.layers:
      layer.device_name = device_name
227670
def auth(self, auth_key):
        
        if self._socket is None:
            self._socket = self._connect()
        return self.call('auth', {"AuthKey": auth_key}, expect_body=False)
1026137
function fingerprint(key) {
    assert.equal('string', typeof key, 'typeof ssh_key');

    var pieces = key.split(' ');
    if (!pieces || !pieces.length || pieces.length < 2)
      throw new Error('invalid ssh key');

    var data = new Buffer(pieces[1], 'base64');

    var hash = crypto.createHash('md5');
    hash.update(data);
    var digest = hash.digest('hex');

    var fp = '';
    for (var i = 0; i < digest.length; i++) {
      if (i && i % 2 === 0)
        fp += ':';

      fp += digest[i];
    }

    return fp;
  }
427027
def _new_device_id(self, key):
        
        device_id = Id.SERVER + 1
        if key in self._key2deviceId:
            return self._key2deviceId[key]
        while device_id in self._clients:
            device_id += 1
        return device_id
275700
def device_initialize(self):
    
    existing_device_initialize(self)
    self.type = 'Other'
    self.id = platform.node()
    self.os_version = platform.version()
    self.locale = locale.getdefaultlocale()[0]