aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer/oauth2-server-php/src/OAuth2/Encryption/EncryptionInterface.php
blob: 8dc720a435d7326ceffc4ecc5bb58c00a68708d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

namespace OAuth2\Encryption;

interface EncryptionInterface
{
    /**
     * @param $payload
     * @param $key
     * @param null $algorithm
     * @return mixed
     */
    public function encode($payload, $key, $algorithm = null);

    /**
     * @param $payload
     * @param $key
     * @param null $algorithm
     * @return mixed
     */
    public function decode($payload, $key, $algorithm = null);

    /**
     * @param $data
     * @return mixed
     */
    public function urlSafeB64Encode($data);

    /**
     * @param $b64
     * @return mixed
     */
    public function urlSafeB64Decode($b64);
}