Completed
Push — master ( dcd9e0...f7e09f )
by Michał
01:57
created

Signer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 28
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 4 1
A getAlgorithm() 0 4 1
1
<?php namespace nyx\auth;
2
3
/**
4
 * Signer
5
 *
6
 * Security note on Signers: The hashers in this component are *absolutely not* meant for hashing passwords.
7
 * They are used for generating signatures of messages, which in turn are used for verifying the authenticity
8
 * of those messages, but are not intended to be used outside of that purpose.
9
 *
10
 * @package     Nyx\Auth
11
 * @version     0.1.0
12
 * @author      Michal Chojnacki <[email protected]>
13
 * @copyright   2012-2017 Nyx Dev Team
14
 * @link        https://github.com/unyx/nyx
15
 */
16
abstract class Signer implements interfaces\Signer
17
{
18
    /**
19
     * The name/identifier of the hashing method this Signer uses.
20
     */
21
    const METHOD = null;
22
23
    /**
24
     * The name/identifier of the hashing algorithm this Signer uses.
25
     */
26
    const ALGORITHM = null;
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function getMethod() : string
32
    {
33
        return static::METHOD;
34
    }
35
36
    /**
37
     * {@inheritDoc}
38
     */
39
    public function getAlgorithm() : string
40
    {
41
        return static::ALGORITHM;
42
    }
43
}
44