| java.lang.Object |
| ↳ |
com.google.gdata.client.authn.oauth.RsaSha1PrivateKeyHelper |
Class Overview
A collection of methods to load an RSA-SHA1 java.security.PrivateKey
object from various sources. The key should be a Base-64 encoded private key
string conforming to the PKCS #8 standard.
Summary
| Public Methods |
|
static
PrivateKey
|
getPrivateKey(File file)
Retrieves a java.security.PrivateKey from a file.
|
|
static
PrivateKey
|
getPrivateKey(byte[] privateKeyBytes)
Retrieves a java.security.PrivateKey from an array of bytes.
|
|
static
PrivateKey
|
getPrivateKey(Reader privateKeyReader)
Retrieves a java.security.PrivateKey from a reader.
|
|
static
PrivateKey
|
getPrivateKey(String privateKeyString)
Retrieves a java.security.PrivateKey from a string.
|
|
static
PrivateKey
|
getPrivateKeyFromFilename(String filename)
Retrieves a java.security.PrivateKey from a file.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Public Methods
public
static
PrivateKey
getPrivateKey
(File file)
Retrieves a java.security.PrivateKey from a file.
Parameters
| file
| The java.io.File object from which to load the private
key. |
Returns
- A java.security.PrivateKey object.
public
static
PrivateKey
getPrivateKey
(byte[] privateKeyBytes)
Retrieves a java.security.PrivateKey from an array of bytes.
Parameters
| privateKeyBytes
| The array of bytes from which to load the private
key. |
Returns
- A java.security.PrivateKey object.
Throws
| NoSuchAlgorithmException
| |
| InvalidKeySpecException
| |
public
static
PrivateKey
getPrivateKey
(Reader privateKeyReader)
Retrieves a java.security.PrivateKey from a reader.
Parameters
| privateKeyReader
| The java.io.Reader object from which to
load the private key. |
Returns
- A java.security.PrivateKey object.
public
static
PrivateKey
getPrivateKey
(String privateKeyString)
Retrieves a java.security.PrivateKey from a string.
Parameters
| privateKeyString
| The string from which to load the private key. |
Returns
- A java.security.PrivateKey object.
public
static
PrivateKey
getPrivateKeyFromFilename
(String filename)
Retrieves a java.security.PrivateKey from a file.
Parameters
| filename
| The filename from which to load the private key. |
Returns
- A java.security.PrivateKey object.