예제 #1
0
 public function setKey(Key $key)
 {
     if ($key->getLength() == 16) {
         $byte = new Byte(24);
         $byte->set($key->get() . $key->getRange(0, 8));
         $key = new Key($byte);
     }
     $this->key = $key;
     return $this;
 }
예제 #2
0
 public function testGetLengthSpread()
 {
     $this->key->setDesKey(\Newcamd\ByteFactory::create('0102030405060708091011121314'));
     $this->assertEquals(16, $this->key->getLength());
 }