@Test public void testSenderKey() throws OSException { OSCoreCtx ctx = new OSCoreCtx(master_secret, true, cipher, sid2, rid, kdf, 32, null, null); byte[] predictedSenderKey = { 0x32, 0x1b, 0x26, (byte) 0x94, 0x32, 0x53, (byte) 0xc7, (byte) 0xff, (byte) 0xb6, 0x00, 0x3b, 0x0b, 0x64, (byte) 0xd7, 0x40, 0x41 }; assertArrayEquals(predictedSenderKey, ctx.getSenderKey()); ctx = new OSCoreCtx(master_secret, true, cipher, sid, rid, kdf, 32, master_salt, null); byte[] predictedSenderKeySalt = { (byte) 0xf0, (byte) 0x91, 0x0e, (byte) 0xd7, 0x29, 0x5e, 0x6a, (byte) 0xd4, (byte) 0xb5, 0x4f, (byte) 0xc7, (byte) 0x93, 0x15, 0x43, 0x02, (byte) 0xff }; assertArrayEquals(predictedSenderKeySalt, ctx.getSenderKey()); ctx = new OSCoreCtx(master_secret, true, cipher, sid, rid, kdf, 32, master_salt, context_id); byte[] predictedSenderKeyContextID = { (byte) 0xaf, 0x2a, 0x13, 0x00, (byte) 0xa5, (byte) 0xe9, 0x57, (byte) 0x88, (byte) 0xb3, 0x56, 0x33, 0x6e, (byte) 0xee, (byte) 0xcd, 0x2b, (byte) 0x92 }; assertArrayEquals(predictedSenderKeyContextID, ctx.getSenderKey()); }
public byte[] getSenderKey() { return sender_key; }
OSCoreCtx { public byte[] getSenderKey() { return sender_key; } }
OSCoreCtx { public byte[] getSenderKey() { return sender_key; } OSCoreCtx(byte[] master_secret, boolean client);  OSCoreCtx(byte[] master_secret, boolean client, AlgorithmID alg, byte[] sender_id, byte[] recipient_id,
			AlgorithmID kdf, Integer replay_size, byte[] master_salt, byte[] contextId); }
OSCoreCtx { public byte[] getSenderKey() { return sender_key; } OSCoreCtx(byte[] master_secret, boolean client);  OSCoreCtx(byte[] master_secret, boolean client, AlgorithmID alg, byte[] sender_id, byte[] recipient_id,
			AlgorithmID kdf, Integer replay_size, byte[] master_salt, byte[] contextId); @Override int hashCode(); @Override boolean equals(Object o); byte[] getSenderKey(); byte[] getRecipientKey(); AlgorithmID getAlg(); synchronized int getSenderSeq(); synchronized int getReceiverSeq(); byte[] getLastBlockTag(); byte[] getSenderId(); byte[] getRecipientId(); byte[] getCommonIV(); int getIVLength(); int getRecipientReplaySize(); int getRecipientReplayWindow(); byte[] getMasterSecret(); byte[] getSalt(); AlgorithmID getKdf(); byte[] getIdContext(); byte[] getMessageIdContext(); boolean getIncludeContextId(); void setIncludeContextId(boolean includeContextId); void setIncludeContextId(byte[] overrideContextId); boolean getResponsesIncludePartialIV(); void setResponsesIncludePartialIV(boolean responsesIncludePartialIV); boolean getContextRederivationEnabled(); void setContextRederivationEnabled(boolean contextRederivationEnabled); int getMaxUnfragmentedSize(); void setMaxUnfragmentedSize(int maxUnfragmentedSize); String getContextIdString(); String getSenderIdString(); String getRecipientIdString(); int rollbackRecipientSeq(); int rollbackRecipientReplay(); synchronized void setSenderSeq(int seq); synchronized void setReceiverSeq(int seq); void setLastBlockTag(byte[] tag); void setSenderKey(byte[] senderKey); void setRecipientKey(byte[] recipientKey); void setSeqMax(int seqMax); String getUri(); ContextRederivation.PHASE getContextRederivationPhase(); void setContextRederivationPhase(ContextRederivation.PHASE contextRederivationPhase); synchronized void increaseSenderSeq(); synchronized void checkIncomingSeq(int seq); synchronized void rollBack(); Code getCoAPCode(); void setCoAPCode(Code coapCode); }
OSCoreCtx { public byte[] getSenderKey() { return sender_key; } OSCoreCtx(byte[] master_secret, boolean client);  OSCoreCtx(byte[] master_secret, boolean client, AlgorithmID alg, byte[] sender_id, byte[] recipient_id,
			AlgorithmID kdf, Integer replay_size, byte[] master_salt, byte[] contextId); @Override int hashCode(); @Override boolean equals(Object o); byte[] getSenderKey(); byte[] getRecipientKey(); AlgorithmID getAlg(); synchronized int getSenderSeq(); synchronized int getReceiverSeq(); byte[] getLastBlockTag(); byte[] getSenderId(); byte[] getRecipientId(); byte[] getCommonIV(); int getIVLength(); int getRecipientReplaySize(); int getRecipientReplayWindow(); byte[] getMasterSecret(); byte[] getSalt(); AlgorithmID getKdf(); byte[] getIdContext(); byte[] getMessageIdContext(); boolean getIncludeContextId(); void setIncludeContextId(boolean includeContextId); void setIncludeContextId(byte[] overrideContextId); boolean getResponsesIncludePartialIV(); void setResponsesIncludePartialIV(boolean responsesIncludePartialIV); boolean getContextRederivationEnabled(); void setContextRederivationEnabled(boolean contextRederivationEnabled); int getMaxUnfragmentedSize(); void setMaxUnfragmentedSize(int maxUnfragmentedSize); String getContextIdString(); String getSenderIdString(); String getRecipientIdString(); int rollbackRecipientSeq(); int rollbackRecipientReplay(); synchronized void setSenderSeq(int seq); synchronized void setReceiverSeq(int seq); void setLastBlockTag(byte[] tag); void setSenderKey(byte[] senderKey); void setRecipientKey(byte[] recipientKey); void setSeqMax(int seqMax); String getUri(); ContextRederivation.PHASE getContextRederivationPhase(); void setContextRederivationPhase(ContextRederivation.PHASE contextRederivationPhase); synchronized void increaseSenderSeq(); synchronized void checkIncomingSeq(int seq); synchronized void rollBack(); Code getCoAPCode(); void setCoAPCode(Code coapCode);  }