16 lines
388 B
PHP
16 lines
388 B
PHP
<?php
|
|
|
|
namespace Objects\TwoFactor;
|
|
|
|
use CBOR\StringStream;
|
|
|
|
trait CBORDecoder {
|
|
|
|
protected function decode(string $buffer): \CBOR\CBORObject {
|
|
$objectManager = new \CBOR\OtherObject\OtherObjectManager();
|
|
$tagManager = new \CBOR\Tag\TagObjectManager();
|
|
$decoder = new \CBOR\Decoder($tagManager, $objectManager);
|
|
return $decoder->decode(new StringStream($buffer));
|
|
}
|
|
|
|
} |