1<?php
2/**
3 * This file is part of the FreeDSx ASN1 package.
4 *
5 * (c) Chad Sikorra <Chad.Sikorra@gmail.com>
6 *
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
10
11namespace FreeDSx\Asn1;
12
13use FreeDSx\Asn1\Encoder\BerEncoder;
14use FreeDSx\Asn1\Encoder\DerEncoder;
15
16/**
17 * Simple factory methods for easily getting an encoder instance for encoding / decoding.
18 *
19 * @author Chad Sikorra <Chad.Sikorra@gmail.com>
20 */
21class Encoders
22{
23    /**
24     * @param array $options
25     * @return BerEncoder
26     */
27    public static function ber(array $options = []) : BerEncoder
28    {
29        return new BerEncoder($options);
30    }
31
32    /**
33     * @param array $options
34     * @return DerEncoder
35     */
36    public static function der(array $options = []) : DerEncoder
37    {
38        return new DerEncoder($options);
39    }
40}
41