1--TEST--
2Crypto\HMAC::__clone basic usage.
3--FILE--
4<?php
5$data1 = "The quick brown fox ";
6$data2 = "jumps over the lazy dog";
7
8$hmac = new Crypto\HMAC('key', 'sha256');
9$hmac->update($data1);
10$hmac_clone = clone $hmac;
11echo $hmac_clone->getAlgorithmName() . "\n";
12
13$hmac->update($data2);
14echo $hmac->hexdigest() . "\n";
15
16$hmac_clone->update($data2);
17echo $hmac_clone->hexdigest() . "\n";
18
19echo "SUCCESS\n";
20?>
21--EXPECT--
22SHA256
23f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8
24f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8
25SUCCESS
26