|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mqe.MQe | +--com.ibm.mqe.MQeCryptor | +--com.ibm.mqe.attributes.MQeXorCryptor
This class is used to create an XORCryptor object that, when used by an
attribute object, provides the attribute object with the mechanisms to perform
XOR encoding. Attribute objects are associated with channel and
MQeFields
objects.
This class is a descendant of MQeCryptor.
Field Summary |
Constructor Summary | |
MQeXorCryptor()
Constructs an MQeXORCryptor object. |
Method Summary | |
void |
setDecryptKey(java.lang.Object newKey)
Explicitly sets the cryptor’s decrypt key. |
void |
setEncryptKey(java.lang.Object newKey)
Explicitly sets the cryptor’s encrypt key. |
Methods inherited from class com.ibm.mqe.MQe |
abbreviate, alias, asciiToByte, byteToAscii, byteToHex, byteToHex, byteToInt, byteToLong, byteToShort, byteToUnicode, fileSeparator, getEventLogHandler, hexToAscii, hexToByte, intToByte, isCLDC, loadClass, loadObject, log, setEventLogHandler, setLoader, sliceByteArray, type, unicodeToByte, uniqueValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MQeXorCryptor()
Constructs an MQeXORCryptor object.
MQeAttribute
try { MQeXorCryptor xor = new MQeXorCryptor(); xor.setEncryptKey(MQe.asciiToByte("It_is_a_secret")); examples.attributes.NTAuthenticator nt = new examples.attributes.NTAuthenticator(); String inData = "0123456789abcdef..."; System.out.println("TestXOR,indata =" + inData); MQeFields tempf = new MQeFields(); tempf.putAscii("testdata", inData); MQeAttribute attr1 = new MQeAttribute(); attr1.activate(null, nt, xor, null); tempf.setAttribute(attr1); byte[]temp = tempf.dump(); MQeFields tempf2 = new MQeFields(); MQeXorCryptor xor2 = new MQeXorCryptor(); xor2.setDecryptKey(MQe.asciiToByte("It_is_a_secret")); examples.attributes.NTAuthenticator nt2 = new examples.attributes.NTAuthenticator(); MQeAttribute attr2 = new MQeAttribute(); attr2.activate(null, nt2, xor2, null); tempf2.setAttribute(attr2); tempf2.restore(temp); System.out.println("TestXORSecure,outdata =" + tempf2.getAscii("testdata")); } catch (Exception e) {// Handle the Exception here. }
Method Detail |
public void setEncryptKey(java.lang.Object newKey) throws java.lang.Exception
Explicitly sets the cryptor’s encrypt key.
This overwrites any key already installed and the key installed has a high precedence than the key installed in the attribute the cryptor object belongs to.
newKey
- byte[] seed from which the cryptor’s encrypt key is derived.
java.lang.Exception
public void setDecryptKey(java.lang.Object newKey) throws java.lang.Exception
Explicitly sets the cryptor’s decrypt key.
This overwrites any key already installed and the key installed has a high precedence than the key installed in the attribute the cryptor object belongs to.
newKey
- byte[] seed from which the cryptor’s decrypt key is derived.
java.lang.Exception
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |