public class ApnsSigningKey extends ApnsKey implements ECPrivateKey
APNS_SIGNATURE_ALGORITHM| Constructor and Description |
|---|
ApnsSigningKey(String keyId,
String teamId,
ECPrivateKey key)
Constructs a new signing key with the given key identifier, team identifier, and elliptic curve private key.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAlgorithm() |
byte[] |
getEncoded() |
String |
getFormat() |
BigInteger |
getS() |
static ApnsSigningKey |
loadFromInputStream(InputStream inputStream,
String teamId,
String keyId)
Loads a signing key from the given input stream.
|
static ApnsSigningKey |
loadFromPkcs8File(File pkcs8File,
String teamId,
String keyId)
Loads a signing key from the given PKCS#8 file.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedpublic ApnsSigningKey(String keyId, String teamId, ECPrivateKey key) throws NoSuchAlgorithmException, InvalidKeyException
keyId - the ten-character, Apple-issued identifier for the key itselfteamId - the ten-character, Apple-issued identifier for the team to which the key belongskey - the elliptic curve public key underpinning this verification keyNoSuchAlgorithmException - if the algorith is not supported by the JVMInvalidKeyException - if the given elliptic curve private key is invalid for any reasonpublic String getAlgorithm()
getAlgorithm in interface Keypublic byte[] getEncoded()
getEncoded in interface Keypublic BigInteger getS()
getS in interface ECPrivateKeypublic static ApnsSigningKey loadFromPkcs8File(File pkcs8File, String teamId, String keyId) throws IOException, NoSuchAlgorithmException, InvalidKeyException
pkcs8File - the file from which to load the keyteamId - the ten-character, Apple-issued identifier for the team to which the key belongskeyId - the ten-character, Apple-issued identitifier for the key itselfIOException - if a key could not be loaded from the given file for any reasonNoSuchAlgorithmException - if the JVM does not support elliptic curve keysInvalidKeyException - if the loaded key is invalid for any reasonpublic static ApnsSigningKey loadFromInputStream(InputStream inputStream, String teamId, String keyId) throws IOException, NoSuchAlgorithmException, InvalidKeyException
inputStream - the input stream from which to load the keyteamId - the ten-character, Apple-issued identifier for the team to which the key belongskeyId - the ten-character, Apple-issued identitifier for the key itselfIOException - if a key could not be loaded from the given file for any reasonNoSuchAlgorithmException - if the JVM does not support elliptic curve keysInvalidKeyException - if the loaded key is invalid for any reasonCopyright © 2013–2018 Turo. All rights reserved.