Uname: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
Software: Apache
PHP version: 5.6.40 [ PHP INFO ] PHP os: Linux
Server Ip: 217.160.0.194
Your Ip: 216.73.217.62
User: u72294154 (9179942) | Group: ftpusers (600)
Safe Mode: OFF
Disable Function:
NONE

name : RFC3610.php
<?php

namespace CryptLibTest\lib\VectorParser;

class RFC3610 {
    
    protected $file = '';
    
    protected $vectors = array();
    
    public function __construct($file) {
        $this->file = $file;
        $this->parse();
    }
    
    public function getVectors() {
        return $this->vectors;
    }
    
    protected function parse() {
        $data = file($this->file);
        $bufferValid = false;
        $buffer = array();
        foreach ($data as $line) {
            $line = trim($line);
            if (empty($line)) {
                $this->processBuffer($buffer);
                $buffer = array();
            } elseif ($line[0] == '=' || strpos($line, ':') !== false) {
                continue;
            } else {
                list ($key, $value) = explode('=', $line, 2);
                $buffer[trim($key)] = trim($value);
            }
        }
    }
    
    protected function processBuffer(array $buffer) {
        $vector = $buffer;
        $adl = strlen($vector['Adata']);
        $vector['Cipher'] = substr($vector['Cipher'], $adl);
        $vector['Data'] = substr($vector['Data'], $adl);
        $this->vectors[] = $vector;
    }
}
© 2026 GrazzMean