|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.crmf.POPOSigningKeyInput
This class contains the POPOSigningKeyInput field from the POPOSigning Key.
POPOSigningKeyInput ::= SEQUENCE { authInfo CHOICE { sender [0] GeneralName, -- used only if an authenticated identity has been -- established for the sender (e.g., a DN from a -- previously-issued and currently-valid certificate) publicKeyMAC PKMACValue }, -- used if no authenticated GeneralName currently exists for -- the sender; publicKeyMAC contains a password-based MAC -- on the DER-encoded value of publicKey publicKey SubjectPublicKeyInfo } -- from CertTemplate PKMACValue ::= SEQUENCE { algId AlgorithmIdentifier, -- the algorithm value shall be PasswordBasedMac -- {1 2 840 113533 7 66 13} -- the parameter value is PBMParameter value BIT STRING } |
See Also
Constructor Summary |
|
POPOSigningKeyInput()
Constructs an empty |
|
POPOSigningKeyInput(byte[] dataBER,
int offset)
Constructs a |
Method Summary |
|
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns true if this object and obj contain the same ProofOfPossesion, returns false otherwise. |
int |
getDEREncoding(byte[] encoding,
int offset)
Places the DER encoding of the POPOSigningKeyInput object into encoding, beginning at offset. |
int |
getDERLen()
Returns the number of bytes that will be used by the DER encoding of the POPOSigningKeyInput. |
int |
getIterationCount()
Gets the iteration count for Password-Based MAC |
static int |
getNextBEROffset(byte[] popBER,
int offset)
Finds the index of the next element to encode, given popBER, the BER of a POPOSigningKeyInput beginning at offset. |
byte[] |
getPKMACValue()
Gets a password-based MAC on the DER-encoded value of public key |
byte[] |
getSalt()
This method returns the salt in a new byte array. |
getSenderName()
Gets the authenticated sender name |
|
com.rsa.jsafe.JSAFE_PublicKey |
getSubjectPublicKey()
Gets the public key out of the POP. |
byte[] |
getSubjectPublicKeyBER()
Gets the public key BER out of the POP. |
void |
setIterationCount(int count)
Sets the iteration count for Password-Based MAC |
void |
setSalt(byte[] salt,
int offset,
int len)
Sets the PBE salt value for Password-Based MAC to the first len bytes of salt, beginning at offset. |
void |
setSenderName(GeneralName sender)
Sets the Sender's name to sender. |
void |
setSharedSecret(char[] secret,
int offset,
int len)
Sets the shared secret |
void |
setSubjectPublicKey(byte[] publicKeyBER,
int offset)
Sets the public key in this POP to be the public key represented by the BER encoding publicKeyBER. |
void |
setSubjectPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey)
Sets the public key in this POP to be publicKey. |
boolean |
verifyPKMACValue()
Verifies the MAC of the public key. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public POPOSigningKeyInput()
object.POPOSigningKeyInput.public POPOSigningKeyInput(byte[] dataBER, int offset) throws CRMFException
POPOSigningKeyInput
object and
initializes it with the given values.by dataBER beginning at
offset, the BER encoding of the POPOSigningKeyInput data.
This constructor only reads the POPOSigningKeyInput data, it does not
perform any verification.Parameters
dataBER | The BER encoding of a POPOSigningKeyInput data | ||
offset | The offset into dataBER where the encoding begins |
Throws
CRMFException
- If the BER is not a valid POPOSigningKeyInput
dataMethod Detail |
public boolean verifyPKMACValue() throws CRMFException
Returns
Throws
CRMFException
- If publicKeyMAC is not set, or secret
is not set, or if there is a MAC error.public void setSharedSecret(char[] secret, int offset, int len) throws CRMFException
Parameters
secret | A char array containg a shared secret distributed in a trusted fashion between CA/RA and end-entity. | ||
offset | An offset into secret array. | ||
len | The length of the shared secret data. |
Throws
CRMFException
- if secret is nullpublic void setSalt(byte[] salt, int offset, int len) throws CRMFException
Parameters
salt | Salt bytes | ||
offset | The offset into salt | ||
len | The length of the salt value |
Throws
CRMFException
- if salt is nullpublic byte[] getSalt()
Returns
public int getIterationCount()
Returns
public void setIterationCount(int count)
Parameters
count | The iteration count |
public GeneralName getSenderName() throws CRMFException
Returns
Throws
CRMFException
- If there is an error in cloningpublic void setSenderName(GeneralName sender) throws CRMFException
Parameters
sender | The Sender's name |
Throws
CRMFException
- If there is an error in cloning;
if the passed value is null.public void setSubjectPublicKey(com.rsa.jsafe.JSAFE_PublicKey publicKey) throws CRMFException
Parameters
publicKey | A JSAFE_PublicKey object that contains the public key |
Throws
CRMFException
- If the public key object is not
validpublic void setSubjectPublicKey(byte[] publicKeyBER, int offset) throws CRMFException
SubjectPublicKeyInfo ::= SEQUENCE { algorithmID AlgorithmIdentifier, subjectPublicKey BIT STRING } |
Parameters
publicKeyBER | The BER encoding of a public key | ||
offset | The offset into publicKeyBER where the encoding begins |
Throws
CRMFException
- If the public key BER is not a valid
public keypublic com.rsa.jsafe.JSAFE_PublicKey getSubjectPublicKey() throws CRMFException
Returns
Throws
CRMFException
- If there is ASN.1 errorpublic byte[] getSubjectPublicKeyBER()
Returns
byte
array that contains the public key BERpublic byte[] getPKMACValue()
Returns
public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
Throws
CloneNotSupportedException
- If the cloning operation
is not successful.public boolean equals(Object obj)
Overrides
equals
in class Object
Parameters
obj | The instance of ProofOfPossesion object |
Returns
boolean
that indicates whether
these objects are equal.public static int getNextBEROffset(byte[] popBER, int offset) throws CRMFException
Parameters
popBER | The BER encoding of a POPOSigningKeyInput | ||
offset | The offset into popBER where the encoding begins |
Returns
Throws
CRMFException
- If the method cannot read the BER
encodingpublic int getDERLen() throws CRMFException
Returns
public int getDEREncoding(byte[] encoding, int offset) throws CRMFException
data [1] IMPLICIT INTEGER |
APP_IMPLICIT
, APP_EXPLICIT
,
PRIVATE_IMPLICIT
, PRIVATE_EXPLICIT
,
OPTIONAL
, DEFAULT
,
CONTEXT_IMPLICIT
,
or CONTEXT_EXPLICIT
.Parameters
encoding | The byte array into which the result will be placed. | ||
offset | The offset into encoding where the writing is to begin. |
Returns
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |