public class WPPublicKey
extends java.lang.Object
Constructor and Description |
---|
WPPublicKey(java.security.interfaces.RSAPublicKey key,
java.lang.String keySeqNo)
Create a WPPublicKey object based on standard Java interface
RSAPublicKey and key sequence number |
Modifier and Type | Method and Description |
---|---|
java.security.interfaces.RSAPublicKey |
getKey()
Returns a RSAPublicKey instance created based on the provided plain text public key
|
java.lang.String |
getKeySeqNo()
Return the key sequence number with which the public key was initialised
|
static WPPublicKey |
parseKey(java.lang.String plainKey)
Parses a plain string format as rsa public key.
|
java.lang.String |
toString()
Return the public key in raw/plain format using Worldpay standard
|
public WPPublicKey(java.security.interfaces.RSAPublicKey key, java.lang.String keySeqNo)
RSAPublicKey
and key sequence numberkey
- a RSAPublicKey instancekeySeqNo
- the key sequence numberpublic static WPPublicKey parseKey(java.lang.String plainKey) throws WPCSEInvalidPublicKey
WPPublicKey key = WPPublicKey.parseKey("1#10001#bf49edcaba456c6357e4ace484c3fba212543e78bf" + "72a8c2238caaa1c7ed20262956caa61d74840598d9b0707bc8" + "2e66f18c8b369c77ae6be0429c93323bb7511fc73d9c7f6988" + "72a8384370cd77c7516caa25a195d48701e3e0462d61200983" + "ba26cc4a20bb059d5beda09270ea6dcf15dd92084c4d5867b6" + "0986151717a8022e4054462ee74ab8533dda77cee227a49fda" + "f58eaeb95df90cb8c05ee81f58bec95339b6262633aef216f3" + "ae503e8be0650350c48859eef406e63d4399994b147e45aaa1" + "4cf9936ac6fdd7d4ec5e66b527d041750ba63a8296b3e6e774" + "a02ee6025c6ee66ef54c3688e4844be8951a8435e6b6e8d676" + "3d9ee5f16521577e159d");
plainKey
- The plain public keyWPCSEInvalidPublicKey
public java.security.interfaces.RSAPublicKey getKey()
public java.lang.String getKeySeqNo()
public java.lang.String toString()
toString
in class java.lang.Object