|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.auth.security.PrivateKeys
public class PrivateKeys
Utility methods for private keys.
| Method Summary | |
|---|---|
static PrivateKey |
loadFromKeyStore(InputStream keyStream,
String storePass,
String alias,
String keyPass)
Retrieves the private key from the specified key store stream using default key store. |
static PrivateKey |
loadFromKeyStore(KeyStore keyStore,
InputStream keyStream,
String storePass,
String alias,
String keyPass)
Retrieves the private key from the specified key store stream and specified key store. |
static PrivateKey |
loadFromP12File(File p12File,
String storePass,
String alias,
String keyPass)
Reads a PKCS#12 format private key from a given file. |
static PrivateKey |
loadFromPk8File(File file)
Reads a PKCS#8 format private key from a given file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PrivateKey loadFromKeyStore(InputStream keyStream,
String storePass,
String alias,
String keyPass)
throws IOException,
GeneralSecurityException
keyStream - input stream to the key store file (closed at the end of this method in a
finally block)storePass - password protecting the key store filealias - alias under which the private key is storedkeyPass - password protecting the private key
IOException
GeneralSecurityException
public static PrivateKey loadFromKeyStore(KeyStore keyStore,
InputStream keyStream,
String storePass,
String alias,
String keyPass)
throws IOException,
GeneralSecurityException
keyStore - key storekeyStream - input stream to the key store file (closed at the end of this method in a
finally block)storePass - password protecting the key store filealias - alias under which the private key is storedkeyPass - password protecting the private key
IOException
GeneralSecurityException
public static PrivateKey loadFromPk8File(File file)
throws IOException,
GeneralSecurityException
PKCS#8 format private key from a given file.
IOException
GeneralSecurityException
public static PrivateKey loadFromP12File(File p12File,
String storePass,
String alias,
String keyPass)
throws GeneralSecurityException,
IOException
PKCS#12 format private key from a given file.
p12File - p12 filestorePass - password protecting the key store filealias - alias under which the private key is storedkeyPass - password protecting the private key
GeneralSecurityException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||