|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.upb.swtpra05.group03.crypto.SigningKeys
helper class to load the signing keys
| Field Summary | |
protected static int |
KEY_SIZE
size of key |
protected static java.lang.String |
KEYGEN_ALGO
algorithm used for key generation |
protected static java.lang.String |
PATH
path used for saving the keys |
| Constructor Summary | |
SigningKeys()
|
|
| Method Summary | |
protected static java.security.KeyPair |
generateKeyPair()
generates a keypair |
static java.security.Key[] |
loadKeys(java.lang.String name)
loads the keys used for signing from a keys file |
static void |
main(java.lang.String[] args)
creates the keys. only needed for the first time, or to change the keys |
protected static void |
saveKeys(java.lang.String name,
java.security.PublicKey pubKey,
java.security.PrivateKey secKey)
saves the keys into a file named ${name}.keys |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String PATH
protected static final java.lang.String KEYGEN_ALGO
protected static final int KEY_SIZE
| Constructor Detail |
public SigningKeys()
| Method Detail |
public static void main(java.lang.String[] args)
throws java.security.NoSuchAlgorithmException,
java.io.IOException
args -
java.security.NoSuchAlgorithmException
java.io.IOException
protected static java.security.KeyPair generateKeyPair()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
protected static void saveKeys(java.lang.String name,
java.security.PublicKey pubKey,
java.security.PrivateKey secKey)
throws java.io.IOException
name - used for the filenamepubKey - secKey -
java.io.IOException
public static java.security.Key[] loadKeys(java.lang.String name)
throws java.io.IOException,
java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException
name - can be shuttle or company(control)
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||