|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.client.authn.oauth.RsaSha1PrivateKeyHelper
public class RsaSha1PrivateKeyHelper
A collection of methods to load an RSA-SHA1 PrivateKey
object from various sources. The key should be a Base-64 encoded private key
string conforming to the PKCS #8 standard.
Method Summary | |
---|---|
static java.security.PrivateKey |
getPrivateKey(byte[] privateKeyBytes)
Retrieves a PrivateKey from an array of bytes. |
static java.security.PrivateKey |
getPrivateKey(java.io.File file)
Retrieves a PrivateKey from a file. |
static java.security.PrivateKey |
getPrivateKey(java.io.Reader privateKeyReader)
Retrieves a PrivateKey from a reader. |
static java.security.PrivateKey |
getPrivateKey(java.lang.String privateKeyString)
Retrieves a PrivateKey from a string. |
static java.security.PrivateKey |
getPrivateKeyFromFilename(java.lang.String filename)
Retrieves a PrivateKey from a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.security.PrivateKey getPrivateKeyFromFilename(java.lang.String filename) throws Base64DecoderException, java.security.spec.InvalidKeySpecException, java.io.IOException, java.security.NoSuchAlgorithmException
PrivateKey
from a file.
filename
- The filename from which to load the private key.
PrivateKey
object.
Base64DecoderException
java.security.spec.InvalidKeySpecException
java.io.IOException
java.security.NoSuchAlgorithmException
public static java.security.PrivateKey getPrivateKey(java.io.File file) throws Base64DecoderException, java.security.spec.InvalidKeySpecException, java.io.IOException, java.security.NoSuchAlgorithmException
PrivateKey
from a file.
file
- The File
object from which to load the private
key.
PrivateKey
object.
Base64DecoderException
java.security.spec.InvalidKeySpecException
java.io.IOException
java.security.NoSuchAlgorithmException
public static java.security.PrivateKey getPrivateKey(java.io.Reader privateKeyReader) throws Base64DecoderException, java.security.spec.InvalidKeySpecException, java.io.IOException, java.security.NoSuchAlgorithmException
PrivateKey
from a reader.
privateKeyReader
- The Reader
object from which to
load the private key.
PrivateKey
object.
Base64DecoderException
java.security.spec.InvalidKeySpecException
java.io.IOException
java.security.NoSuchAlgorithmException
public static java.security.PrivateKey getPrivateKey(java.lang.String privateKeyString) throws Base64DecoderException, java.security.spec.InvalidKeySpecException, java.security.NoSuchAlgorithmException
PrivateKey
from a string.
privateKeyString
- The string from which to load the private key.
PrivateKey
object.
Base64DecoderException
java.security.spec.InvalidKeySpecException
java.security.NoSuchAlgorithmException
public static java.security.PrivateKey getPrivateKey(byte[] privateKeyBytes) throws java.security.spec.InvalidKeySpecException, java.security.NoSuchAlgorithmException
PrivateKey
from an array of bytes.
privateKeyBytes
- The array of bytes from which to load the private
key.
PrivateKey
object.
java.security.spec.InvalidKeySpecException
java.security.NoSuchAlgorithmException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |