public class Challenge
extends java.lang.Object
POPChallenge
Constructor and Description |
---|
Challenge()
Create a new, empty
Challenge . |
Challenge(AlgorithmIdentifier digestAlg,
java.math.BigInteger randomInt,
GeneralName sender,
java.security.PublicKey pubKey)
Create a new
Challenge instance using the given digest algorithm,
challenge random integer and sender's name, and encrypts the challenge using the
given public key. |
Challenge(java.io.InputStream is) |
Modifier and Type | Method and Description |
---|---|
AlgorithmIdentifier |
getDigestAlgID() |
java.math.BigInteger |
getRandomInt(java.security.PrivateKey privKey)
Note the changes in the method signature
|
GeneralName |
getSender(java.security.PrivateKey privKey)
Note the changes in the method signature
|
byte[] |
getWitness() |
void |
input(java.io.InputStream is) |
int |
length() |
void |
output(java.io.OutputStream os) |
java.lang.String |
toString() |
public Challenge()
Challenge
.public Challenge(AlgorithmIdentifier digestAlg, java.math.BigInteger randomInt, GeneralName sender, java.security.PublicKey pubKey) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
Challenge
instance using the given digest algorithm,
challenge random integer and sender's name, and encrypts the challenge using the
given public key.
Note the changes in the method signature
Previously public Challenge (AlgorithmIdentifier , BigInteger , GeneralName , oracle.security.crypto.core.PublicKey)
Nowpublic Challenge (AlgorithmIdentifier , BigInteger , GeneralName , java.security.PublicKey)
Note the change in the exceptions declared to be thrown.
Exceptions no longer thrown -- AlgorithmIdentifierException,CipherException
Exceptions introduced -- java.security.InvalidKeyException ,NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException,BadPaddingException
digestAlg
- The digest algorithm used to produce the witness digest bytes.randomInt
- The random integer that will be encrypted to form the challenge
(with the sender's name).sender
- The sender's name that will be encrypted to form the challenge
(with the random integer).pubKey
- The public key of the recipient, which will be used to encrypt
the challenge.java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
javax.crypto.NoSuchPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
public Challenge(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public AlgorithmIdentifier getDigestAlgID()
public byte[] getWitness()
public java.math.BigInteger getRandomInt(java.security.PrivateKey privKey) throws javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
Note the changes in the method signature
Previously public BigInteger getRandomInt (oracle.security.crypto.core.PrivateKey )
Now public BigInteger getRandomInt (java.security.PrivateKey )
Note the change in the exceptions declared to be thrown.
Exceptions no longer thrown --CipherException
Exceptions introduced -- NoSuchPaddingException, IllegalBlockSizeException,BadPaddingException
javax.crypto.NoSuchPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
public GeneralName getSender(java.security.PrivateKey privKey) throws javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
Note the changes in the method signature
Previously public GeneralName getSender (oracle.security.crypto.core.PrivateKey )
Now public GeneralName getSender (java.security.PrivateKey )
Note the change in the exceptions declared to be thrown.
Exceptions no longer thrown --CipherException
Exceptions introduced -- NoSuchPaddingException, IllegalBlockSizeException,BadPaddingException
javax.crypto.NoSuchPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
public java.lang.String toString()
toString
in class java.lang.Object
public void input(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void output(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public int length()