Class KeyUtils
java.lang.Object
com.google.jenkins.plugins.credentials.oauth.KeyUtils
Deprecated.
Utility methods for handling key files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic File
createKeyFile
(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 void
updatePermissions
(File file) Deprecated.Sets the permissions of the file to owner-only read/write.static void
writeKeyToFile
(InputStream keyStream, File file) Deprecated.Writes the key contained in the givenInputStream
to the given keyfile.static void
writeKeyToFileEncoded
(String key, File file) Deprecated.Writes the given key to the given keyfile, passing it throughSecret
to 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 throughSecret
to 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 givenInputStream
to the given keyfile. Does not close the input stream.- Throws:
IOException
-
SecretBytes
instead.