Commit | Line | Data |
---|---|---|
14d4f286 S |
1 | <?php |
2 | /** | |
3 | * To change this template, choose Tools | Templates | |
4 | * and open the template in the editor. | |
5 | * @version Build @@version@@ | |
6 | */ | |
7 | ||
8 | namespace CryptLib\Key\Symmetric; | |
9 | ||
10 | /** | |
11 | * Description of abstractsymetric | |
12 | * | |
13 | * @author ircmaxell | |
14 | */ | |
15 | abstract class AbstractSymmetric implements \CryptLib\Key\Symmetric { | |
16 | ||
17 | protected $key = ''; | |
18 | ||
19 | public function __toString() { | |
20 | return $this->getKey(); | |
21 | } | |
22 | ||
23 | public function getKey() { | |
24 | return $this->key; | |
25 | } | |
26 | ||
27 | public function getType() { | |
28 | return self::SYMMETRIC; | |
29 | } | |
30 | ||
31 | public function saveKey($filename) { | |
32 | file_put_contents($filename, $this->getKey()); | |
33 | } | |
34 | ||
35 | } |