|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.auth.RsaSha
public class RsaSha
Utility methods for "RSA-SHA1" signing method.
| Method Summary | |
|---|---|
static PrivateKey |
getPrivateKeyFromKeystore(InputStream keyStream,
String storePass,
String alias,
String keyPass)
Retrieves the private key from the specified key store. |
static PrivateKey |
getPrivateKeyFromPk8(File file)
Reads a PKCS#8 format private key from a given file. |
static String |
sign(PrivateKey privateKey,
String data)
Signs the given data using the given private key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PrivateKey getPrivateKeyFromKeystore(InputStream keyStream,
String storePass,
String alias,
String keyPass)
throws IOException,
GeneralSecurityException
keyStream - input stream to the key store filestorePass - password protecting the key store filealias - alias under which the private key is storedkeyPass - password protecting the private key
GeneralSecurityException - if the key store cannot be loaded
IOException - if the file cannot be accessed
public static PrivateKey getPrivateKeyFromPk8(File file)
throws IOException,
GeneralSecurityException
PKCS#8 format private key from a given file.
NoSuchAlgorithmException
IOException
GeneralSecurityException
public static String sign(PrivateKey privateKey,
String data)
throws GeneralSecurityException
GeneralSecurityException - general security exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||