本文整理汇总了Java中com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem类的典型用法代码示例。如果您正苦于以下问题:Java AbstractChaoticSystem类的具体用法?Java AbstractChaoticSystem怎么用?Java AbstractChaoticSystem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractChaoticSystem类属于com.archosResearch.jCHEKS.concept.chaoticSystem包,在下文中一共展示了AbstractChaoticSystem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isSameState
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Override
public boolean isSameState(AbstractChaoticSystem other) {
ChaoticSystem otherSystem = (ChaoticSystem)other;
Set<Integer> agentIDs = this.agents.keySet();
for (Integer agentID : agentIDs) {
Agent agent = this.agents.get(agentID);
if (!otherSystem.agents.get(agentID).isSameState(agent)) return false;
}
return true;
}
示例2: decrypt_should_decrypt_the_message
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void decrypt_should_decrypt_the_message() throws NoSuchAlgorithmException, NoSuchPaddingException, EncrypterException, Exception {
RijndaelEncrypter instance = new RijndaelEncrypter();
AbstractChaoticSystem chaoticSystem = new MockChaoticSystem(instance.getByteNeeded());
byte[] key = chaoticSystem.getKey(instance.getByteNeeded());
String result = instance.decrypt(this.encrypted, key);
assertEquals(result, this.decrypted);
}
示例3: encrypt_should_encrypt_the_message
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void encrypt_should_encrypt_the_message() throws NoSuchAlgorithmException, NoSuchPaddingException, EncrypterException, Exception {
RijndaelEncrypter instance = new RijndaelEncrypter();
AbstractChaoticSystem chaoticSystem = new MockChaoticSystem(instance.getByteNeeded());
byte[] key = chaoticSystem.getKey(instance.getByteNeeded());
String result = instance.encrypt(this.decrypted, key);
assertEquals(result, this.encrypted);
}
示例4: Contact
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
public Contact(ContactInfo contactInfo, AbstractCommunicator communicator, AbstractEncrypter encrypter, AbstractChaoticSystem sendingChaoticSystem, AbstractChaoticSystem receivingChaoticSystem) {
this.contactInfo = contactInfo;
this.communicator = communicator;
this.encrypter = encrypter;
this.sendingChaoticSystem = sendingChaoticSystem;
this.receivingChaoticSystem = receivingChaoticSystem;
}
示例5: getSendingChaoticSystem_should_return_the_chaoticSystem_of_the_contact
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void getSendingChaoticSystem_should_return_the_chaoticSystem_of_the_contact() throws Exception {
AbstractChaoticSystem givenChaoticSystem = new StubChaoticSystem();
Contact contact = new Contact(aliceContactInfo, new StubCommunicator(), new StubEncrypter(), givenChaoticSystem, new StubChaoticSystem());
AbstractChaoticSystem receivedChaoticSystem = contact.getSendingChaoticSystem();
assertEquals(givenChaoticSystem, receivedChaoticSystem);
}
示例6: getReceivingChaoticSystem_should_return_the_chaoticSystem_of_the_contact
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void getReceivingChaoticSystem_should_return_the_chaoticSystem_of_the_contact() throws Exception {
AbstractChaoticSystem givenChaoticSystem = new StubChaoticSystem();
Contact contact = new Contact(aliceContactInfo, new StubCommunicator(), new StubEncrypter(), new StubChaoticSystem(), givenChaoticSystem);
AbstractChaoticSystem receivedChaoticSystem = contact.getReceivingChaoticSystem();
assertEquals(givenChaoticSystem, receivedChaoticSystem);
}
示例7: isSameState
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Override
public boolean isSameState(AbstractChaoticSystem system) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
示例8: cloneSystem
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Override
public AbstractChaoticSystem cloneSystem() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
示例9: testGenerateSecureAck
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void testGenerateSecureAck() throws Exception {
AbstractChaoticSystem chaoticSystem = new MockChaoticSystem(SecureAckGenerator.getKeyLength());
String result = SecureAckGenerator.generateSecureAck(chaoticSystem.getKey(), message);
assertEquals(result, messageChecked);
}
示例10: testValidateSecureAck
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void testValidateSecureAck() throws Exception {
AbstractChaoticSystem chaoticSystem = new MockChaoticSystem(SecureAckGenerator.getKeyLength());
assertTrue(SecureAckGenerator.validateSecureAck(chaoticSystem.getKey(), message, messageChecked));
}
示例11: testEncodeMessage
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void testEncodeMessage() throws Exception {
AbstractChaoticSystem chaoticSystem = new MockChaoticSystem(MessageChecker.getKeyLength());
String result = MessageChecker.encodeMessage(chaoticSystem.getKey(), message);
assertEquals(result, messageChecked);
}
示例12: testValidateMessage
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Test
public void testValidateMessage() throws Exception {
AbstractChaoticSystem chaoticSystem = new MockChaoticSystem(MessageChecker.getKeyLength());
assertTrue(MessageChecker.validateMessage(chaoticSystem.getKey(), message, messageChecked));
}
示例13: getSendingChaoticSystem
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
public AbstractChaoticSystem getSendingChaoticSystem() {
return this.sendingChaoticSystem;
}
示例14: getReceivingChaoticSystem
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
public AbstractChaoticSystem getReceivingChaoticSystem() {
return this.receivingChaoticSystem;
}
示例15: cloneSystem
import com.archosResearch.jCHEKS.concept.chaoticSystem.AbstractChaoticSystem; //导入依赖的package包/类
@Override
public AbstractChaoticSystem cloneSystem() { return null;}