Returns the subject's key identifier, or null
358647
public KeyIdentifier getSubjectKeyId() {
        SubjectKeyIdentifierExtension ski = getSubjectKeyIdentifierExtension();
        if (ski != null) {
            try {
                return (KeyIdentifier)ski.get(
                    SubjectKeyIdentifierExtension.KEY_ID);
            } catch (IOException ioe) {} // not possible
        }
        return null;
    }
1209928
def _get_id(self):
        """"""
        return ''.join(map(str,
                           filter(is_not_None,
                                  [self.Prefix, self.Name])))
898190
public Object getMessageKey() {
        Object key = getHeader(KafkaMessageHeaders.MESSAGE_KEY);

        if (key != null) {
            return key;
        }

        return null;
    }
772132
@Nullable
    public String getIdentityPublicKey() {
        RSAPublicKey key = InstanceIdentityProvider.RSA.getPublicKey();
        return key == null ? null : new String(Base64.encodeBase64(key.getEncoded()), Charset.forName("UTF-8"));
    }
123778
protected String getSigningKey() {
        if (extendedMetadata != null && extendedMetadata.getSigningKey() != null) {
            return extendedMetadata.getSigningKey();
        } else {
            return keyManager.getDefaultCredentialName();
        }
    }
720863
def update_subject_identifier_on_save(self):
        
        if not self.subject_identifier:
            self.subject_identifier = self.subject_identifier_as_pk.hex
        elif re.match(UUID_PATTERN, self.subject_identifier):
            pass
        return self.subject_identifier
1332085
private function getKey ( $key = NULL ) {
        if ($key === NULL) {
            $key = $this->__keyName;
            return $this->getClassKey() . '_' . $this->$key;
        }
        return $this->getClassKey() . '_' . $key;
    }
1111207
SubjectIdentity getSubjectIdentity(final String protocol, final String forHost) {
        KeytabService selectedService = null;

        final String hostName = forHost == null ? null : forHost.toLowerCase(Locale.ENGLISH);
        String name = protocol + "/" + hostName;
        selectedService = hostServiceMap.get(name);
        if (selectedService == null) {
            SECURITY_LOGGER.tracef("No mapping for name '%s' to KeytabService, attempting to use host only match.", name);
            selectedService = hostServiceMap.get(hostName);
            if (selectedService == null) {
                SECURITY_LOGGER.tracef("No mapping for host '%s' to KeytabService, attempting to use default.", forHost);
                selectedService = defaultService;
            }
        }

        if (selectedService != null) {
            if (SECURITY_LOGGER.isTraceEnabled()) {
                SECURITY_LOGGER.tracef("Selected KeytabService with principal '%s' for host '%s'",
                        selectedService.getPrincipal(), forHost);
            }
            try {
                return selectedService.createSubjectIdentity(false);
            } catch (LoginException e) {
                SECURITY_LOGGER.keytabLoginFailed(selectedService.getPrincipal(), forHost, e);
                /*
                 * Allow to continue and return null, i.e. we have an error preventing Kerberos authentication so log that but
                 * other mechanisms may be available leaving the server still accessible.
                 */
            }
        } else {
            SECURITY_LOGGER.tracef("No KeytabService available for host '%s' unable to return SubjectIdentity.", forHost);
        }

        return null;
    }
1144215
private String getUserKey( AppInfo appInfo, String userId )
    {
        if ( userId == null ) {
            throw new IllegalArgumentException( "userId should not be null" );
        }

        return String.format( "%s%s", getAppPrefix( appInfo ), userId );
    }
585103
private WSCredential getWSCredentialFromSubject(Subject subject) {
        if (subject != null) {
            java.util.Collection<Object> publicCreds = subject.getPublicCredentials();

            if (publicCreds != null && publicCreds.size() > 0) {
                java.util.Iterator<Object> publicCredIterator = publicCreds.iterator();

                while (publicCredIterator.hasNext()) {
                    Object cred = publicCredIterator.next();

                    if (cred instanceof WSCredential) {
                        return (WSCredential) cred;
                    }
                }
            }
        }
        return null;
    }
655676
def _key(self):
        
        return Key(self._schema.key_type, self._identity, self._name,
                   [str(item.value) for item in self._dimension_fields.values()])
483306
public KeyIdentifier get(String name) throws IOException {
        if (name.equalsIgnoreCase(KEY_ID)) {
            return (id);
        } else {
          throw new IOException("Attribute name not recognized by " +
                "CertAttrSet:SubjectKeyIdentifierExtension.");
        }
    }
185639
@Override @Nullable
    public KeyCrypter getKeyCrypter() {
        if (keyCrypter != null)
            return keyCrypter;
        else if (parent != null)
            return parent.getKeyCrypter();
        else
            return null;
    }
441927
private static String getIdentifier(String target) {

        // check map
        String id = LOCATION_IDENTIFIER_MAP.get(target);
        if (id == null) {
            id = LOCATION_IDENTIFIER_PREFIX + target;
            LOCATION_IDENTIFIER_MAP.put(target, id);
        }
        return id;

    }
1074483
private String primGetName(String key) {
        String name = key;
        final IPersonAttributes personAttributes = this.paDao.getPerson(name);
        if (personAttributes != null) {
            Object displayName = personAttributes.getAttributeValue("displayName");
            String displayNameStr = "";
            if (displayName != null) {
                displayNameStr = String.valueOf(displayName);
                if (StringUtils.isNotEmpty(displayNameStr)) {
                    name = displayNameStr;
                }
            }
        }
        return name;
    }
442245
static String getKeyword(ObjectIdentifier oid, int standard) {
        return getKeyword
            (oid, standard, Collections.<String, String>emptyMap());
    }
690535
public PublicKey getPublicKey() {
        if (info == null)
            return null;
        try {
            PublicKey key = (PublicKey)info.get(CertificateX509Key.NAME
                                + DOT + CertificateX509Key.KEY);
            return key;
        } catch (Exception e) {
            return null;
        }
    }