Get the key with the +fingerprint+.
 If +secret+ is +true+, secret key is returned.
554135
def get_key(fingerprint, secret = false)
      rkey = []
      err = GPGME::gpgme_get_key(self, fingerprint, rkey, secret ? 1 : 0)
      exc = GPGME::error_to_exception(err)
      raise exc if exc
      rkey[0]
    end
589499
function(secret) {
        var keyIv;
        if (!secret) {
          throw new CError('missing secret').log();
        }
        // secret is a Base64 string
        if(secret.isBase64()){
          try {
            keyIv = forge.util.decode64(secret);
          } catch (e) {
            throw new CError('secret not valid').log();
          }
        } else {
          keyIv = secret;
        }
        return keyIv;
      }
711743
def fingerprint_from_raw_ssh_pub_key(key):
    
    fp_plain = hashlib.md5(key).hexdigest()
    return ':'.join(a + b for a, b in zip(fp_plain[::2], fp_plain[1::2]))
695188
def get_secret(
        end_state: NettingChannelEndState,
        secrethash: SecretHash,
) -> Optional[Secret]:
    """"""
    partial_unlock_proof = end_state.secrethashes_to_unlockedlocks.get(secrethash)

    if partial_unlock_proof is None:
        partial_unlock_proof = end_state.secrethashes_to_onchain_unlockedlocks.get(secrethash)

    if partial_unlock_proof is not None:
        return partial_unlock_proof.secret

    return None
701557
def get(self, key):
    '''
    '''
    key = self._service_key(key)
    return self._service_ops['get'](key)
971937
def get_key(self):
        
        event = self.get_event()
        if event and isinstance(event, KeyboardEvent):
            return event.key_code
        return None
945655
public OmemoFingerprint getOwnFingerprint()
            throws SmackException.NotLoggedInException, CorruptedOmemoKeyException {
        synchronized (LOCK) {
            if (getOwnJid() == null) {
                throw new SmackException.NotLoggedInException();
            }

            return getOmemoService().getOmemoStoreBackend().getFingerprint(getOwnDevice());
        }
    }
423016
def match_keys(inp, p=False):
    """"""
    _keys = []
    ssh_keys = DO.get_ssh_keys()
    for k in inp.split(","):
        done = False
        if k.isdigit():
            for _ in [s for s in ssh_keys if s["id"] == int(k)]:
                done = True
                _keys.append(_["fingerprint"])
        else:
            for _ in [s for s in ssh_keys if s["fingerprint"] == k]:
                done = True
                _keys.append(_["fingerprint"])
        if p and not done:
            print("Could not find a match for '{}', skipping".format(k), file=sys.stderr)
    return _keys
126489
function getKey(key, masterPassword) {
    var contents = getContents(masterPassword);
    if (contents[key] != undefined) return contents[key];
    else throw new Error(`Unable to find key '${key}' in password safe.`);
}
543547
static int getFingerprint(Method method) {
    int hashcode = method.getName().hashCode();
    hashcode =  hashcode + 31*method.getReturnType().getName().hashCode();
    for (Class<?> type : method.getParameterTypes()) {
      hashcode = 31*hashcode ^ type.getName().hashCode();
    }
    return hashcode;
  }
451572
def key(self, att=None):
        """"""
        if att is not None:
            return self._key[self.id][att]
        else:
            return self._key[self.id]
137292
async def unlock(self, device):
        
        device = self._find_device(device)
        if not self.is_handleable(device) or not device.is_crypto:
            self._log.warn(_('not unlocking {0}: unhandled device', device))
            return False
        if device.is_unlocked:
            self._log.info(_('not unlocking {0}: already unlocked', device))
            return True
        if not self._prompt:
            self._log.error(_('not unlocking {0}: no password prompt', device))
            return False
        unlocked = await self._unlock_from_cache(device)
        if unlocked:
            return True
        unlocked = await self._unlock_from_keyfile(device)
        if unlocked:
            return True
        options = dict(allow_keyfile=self.udisks.keyfile_support,
                       allow_cache=self._cache is not None,
                       cache_hint=self._cache_hint)
        password = await self._prompt(device, options)
        # password can be: None, str, or udiskie.prompt.PasswordResult
        cache_hint = getattr(password, 'cache_hint', self._cache_hint)
        password = getattr(password, 'password', password)
        if password is None:
            self._log.debug(_('not unlocking {0}: cancelled by user', device))
            return False
        if isinstance(password, bytes):
            self._log.debug(_('unlocking {0} using keyfile', device))
            await device.unlock_keyfile(password)
        else:
            self._log.debug(_('unlocking {0}', device))
            await device.unlock(password)
        self._update_cache(device, password, cache_hint)
        self._log.info(_('unlocked {0}', device))
        return True
400981
def _get_key_info(self):
        """"""
        if self._key_info_cache is None:
            self._key_info_cache = ssh_key_info_from_key_data(self.key_id,
                                                              self.priv_key)
        return self._key_info_cache
670032
def get_key(key=None, keyfile=None):
    
    if key is None:
        if keyfile is None:
            key = environ.get('CRYPTOYAML_SECRET')
            if key is None:
                raise MissingKeyException(
                    '''You must either provide a key value,'''
                    ''' a path to a key or its value via the environment variable '''
                    ''' CRYPTOYAML_SECRET'''
                )
            else:
                key = key.encode('utf-8')
        else:
            key = open(keyfile, 'rb').read()
    return key
1118564
def get_key(raw=False):
    
    while True:
        try:
            if kbhit():
                char = getch()
                ordinal = ord(char)
                if ordinal in (0, 224):
                    extention = ord(getch())
                    scan_code = ordinal + extention * 256
                    result = scan_codes.get(scan_code)
                    break
                else:
                    result = char.decode()
                    break
        except KeyboardInterrupt:
            return "ctrl-c"
    return result if raw else keys_flipped.get(result, result)
1233572
def get(self, key):
        
        validate_is_bytes(key)

        return self._get(self.root_hash, encode_to_bin(key))
548467
def key_from_keybase(username, fingerprint=None):
    """"""
    url = keybase_lookup_url(username)
    resp = requests.get(url)
    if resp.status_code == 200:
        j_resp = json.loads(polite_string(resp.content))
        if 'them' in j_resp and len(j_resp['them']) == 1:
            kb_obj = j_resp['them'][0]
            if fingerprint:
                return fingerprint_from_keybase(fingerprint, kb_obj)
            else:
                if 'public_keys' in kb_obj \
                   and 'pgp_public_keys' in kb_obj['public_keys']:
                    key = kb_obj['public_keys']['primary']
                    return massage_key(key)

    return None