Class KeyUtils
java.lang.Object
com.google.jenkins.plugins.credentials.oauth.KeyUtils
Deprecated.
Utility methods for handling key files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilecreateKeyFile(String prefix, String suffix) Deprecated.Creates a file with the given prefix/suffix in a standard Google auth directory, and sets the permissions of the file to owner-only read/write.static voidupdatePermissions(File file) Deprecated.Sets the permissions of the file to owner-only read/write.static voidwriteKeyToFile(InputStream keyStream, File file) Deprecated.Writes the key contained in the givenInputStreamto the given keyfile.static voidwriteKeyToFileEncoded(String key, File file) Deprecated.Writes the given key to the given keyfile, passing it throughSecretto encode the string.
-
Method Details
-
createKeyFile
Deprecated.Creates a file with the given prefix/suffix in a standard Google auth directory, and sets the permissions of the file to owner-only read/write. Note: this doesn't work on Windows.- Throws:
IOException- if filesystem interaction fails.
-
updatePermissions
Deprecated.Sets the permissions of the file to owner-only read/write. Note: this doesn't work on Windows.- Throws:
IOException- if filesystem interaction fails.
-
writeKeyToFileEncoded
Deprecated.Writes the given key to the given keyfile, passing it throughSecretto encode the string. Note that, per the documentation ofSecret, this does not protect against an attacker who has full access to the local file system, but reduces the chance of accidental exposure.- Throws:
IOException
-
writeKeyToFile
Deprecated.Writes the key contained in the givenInputStreamto the given keyfile. Does not close the input stream.- Throws:
IOException
-
SecretBytesinstead.