add methods to decrypt return data from router
[GitHub/Stricted/speedport-hybrid-php-api.git] / CryptLib / MAC / MAC.php
CommitLineData
14d4f286
S
1<?php
2/**
3 * The basic interface for MAC (Message Authentication Code) generation
4 *
5 * PHP version 5.3
6 *
7 * @category PHPCryptLib
8 * @package MAC
9 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
10 * @copyright 2011 The Authors
11 * @license http://www.opensource.org/licenses/mit-license.html MIT License
12 * @version Build @@version@@
13 */
14namespace CryptLib\MAC;
15
16/**
17 * The basic interface for MAC (Message Authentication Code) generation
18 *
19 * @category PHPCryptLib
20 * @package MAC
21 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
22 */
23interface MAC {
24
25 /**
26 * Build the instance of the MAC generator
27 *
28 * @param array $options The options for the instance
29 *
30 * @return void
31 */
32 public function __construct(array $options = array());
33
34 /**
35 * Generate the MAC using the supplied data
36 *
37 * @param string $data The data to use to generate the MAC with
38 * @param string $key The key to generate the MAC
39 * @param int $size The size of the output to return
40 *
41 * @return string The generated MAC of the appropriate size
42 */
43 public function generate($data, $key, $size = 0);
44
45}