Create a new ssh key for the authenticated user.

@param title        The title of the ssh key
@param key          The public key
@return The new GitlabSSHKey
@throws IOException on gitlab api call error
177729
public GitlabSSHKey createSSHKey(String title, String key) throws IOException {

        Query query = new Query()
                .append("title", title)
                .append("key", key);

        String tailUrl = GitlabUser.USER_URL + GitlabSSHKey.KEYS_URL + query.toString();

        return dispatch().to(tailUrl, GitlabSSHKey.class);
    }
44274
public B setTitle(String title) {
        if(title == null) {
            title = "";
        }
        this.title = title;
        return self();
    }
801326
public void setTitle(java.lang.String title) {
        getStateHelper().put(PropertyKeys.title, title);
        handleAttribute("title", title);
    }
1244453
public void setTitleKey(String titleKey) {

        m_titleKey = titleKey;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_SET_TITLE_KEY_1, titleKey));
        }
    }
66524
public static String hashKey(String key) {
        try {
            MessageDigest md = MessageDigest.getInstance("SHA1");
            md.update(key.getBytes(StandardCharsets.UTF_8));
            md.update(MAGIC);
            return new String(B64Code.encode(md.digest()));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
556257
public static base_response create(nitro_service client, ssldsakey resource) throws Exception {
		ssldsakey createresource = new ssldsakey();
		createresource.keyfile = resource.keyfile;
		createresource.bits = resource.bits;
		createresource.keyform = resource.keyform;
		createresource.des = resource.des;
		createresource.des3 = resource.des3;
		createresource.password = resource.password;
		return createresource.perform_operation(client,"create");
	}
117704
public OvhSshKey sshKey_keyName_GET(String keyName) throws IOException {
		String qPath = "/me/sshKey/{keyName}";
		StringBuilder sb = path(qPath, keyName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhSshKey.class);
	}
767771
public static SshPublicKeyFile parse(byte[] formattedkey)
			throws IOException {
		try {
			try {
				return new OpenSSHPublicKeyFile(formattedkey);
			} catch (IOException ex) {
				try {
					return new SECSHPublicKeyFile(formattedkey);
				} catch (IOException ex2) {
					throw new IOException(
							"Unable to parse key, format could not be identified");
				}
			}
		} catch (OutOfMemoryError ex1) {
			throw new IOException(
					"An error occurred parsing a public key file! Is the file corrupt?");
		}
	}
1307139
public function addNewDeployKey(string $title, string $key): array
    {
        return $this->getApi()->request($this->getApi()
                                             ->sprintf('/repos/:owner/:repo/keys', $this->getRepositories()->getOwner(),
                                                 $this->getRepositories()->getRepo()), Request::METHOD_POST, [
                'title' => $title,
                'key'   => $key
            ]);
    }
471349
public void createEmptyObject(String key) throws QiniuException {
    com.qiniu.http.Response response =
        mUploadManager.put(new byte[0], key, mAuth.uploadToken(mBucketName, key));
    response.close();
  }
415570
public static void title(Writer writer, String title) throws IOException {
        if (title == null || title.isEmpty()) {
            return;
        }
        String out = String.format("%s\n%s\n\n", title,
                Stream.generate(() -> "=").limit(title.length()).collect(Collectors.joining()));
        writer.write(out);
    }
264028
def create_ssh_pub_key(self, name, key):
        
        self.nova.keypairs.create(name, key)
1346432
private KeyHook create(KeyBinding key)
    {
        if (key != null && key instanceof KeyHook)
        {
            return (KeyHook)key; // Don't create a KeyHook to replace this KeyBinding, since that has already been done at some point.
            // (Minecraft keeps a pointer to every KeyBinding that gets created, and they never get destroyed - so we don't want to create
            // any more than necessary.)
        }
        return new KeyHook(key.getKeyDescription(), key.getKeyCode(), key.getKeyCategory());
    }
556431
public OvhSshKeyDetail project_serviceName_sshkey_keyId_GET(String serviceName, String keyId) throws IOException {
		String qPath = "/cloud/project/{serviceName}/sshkey/{keyId}";
		StringBuilder sb = path(qPath, serviceName, keyId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhSshKeyDetail.class);
	}
1096514
def create(self, name, ssh_key, params=None):
        ''' 
        '''
        params = update_params(params, {
            'name': name,
            'ssh_key': ssh_key
        })
        return self.request('/v1/sshkey/create', params, 'POST')
799122
def create_key(self, title, key, read_only=False):
        
        assert isinstance(title, (str, unicode)), title
        assert isinstance(key, (str, unicode)), key
        assert isinstance(read_only, bool), read_only
        post_parameters = {
            "title": title,
            "key": key,
            "read_only": read_only,
        }
        headers, data = self._requester.requestJsonAndCheck(
            "POST",
            self.url + "/keys",
            input=post_parameters
        )
        return github.RepositoryKey.RepositoryKey(self._requester, headers, data, completed=True)
489194
public Optional<SshKey> getOptionalSshKey(Integer keyId) {
        try {
            return (Optional.ofNullable(getSshKey(keyId)));
        } catch (GitLabApiException glae) {
            return (GitLabApi.createOptionalFromException(glae));
        }
    }