Tiqr_UserSecretStorage_Encryption_Plain::encrypt()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php 
2
/**
3
 * This file is part of the tiqr project.
4
 * 
5
 * The tiqr project aims to provide an open implementation for 
6
 * authentication using mobile devices. It was initiated by 
7
 * SURFnet and developed by Egeniq.
8
 *
9
 * More information: http://www.tiqr.org
10
 *
11
 * @author Peter Verhage <[email protected]>
12
 * 
13
 * @package tiqr
14
 *
15
 * @license New BSD License - See LICENSE file for details.
16
 *
17
 * @copyright (C) 2010-2012 SURFnet BV
18
 */
19
20
use Psr\Log\LoggerInterface;
21
22
/**
23
 * Dummy encryption class, returns the data as is.
24
 * Does not actually encrypt/decrypt the data.
25
 * 
26
 * @author peter
27
 */
28
class Tiqr_UserSecretStorage_Encryption_Plain implements Tiqr_UserSecretStorage_Encryption_Interface
29
{
30
    /**
31
     * Construct an encryption instance.
32
     *
33
     * @param Array $config The configuration that a specific configuration class may use.
34
     *
35
     */
36 28
    public function __construct(array $config)
37
    {
38 28
    }
39
    
40
    /**
41
     * Encrypts the given data. 
42
     *
43
     * @param String $data Data to encrypt.
44
     *
45
     * @return String encrypted data
46
     */
47 6
    public function encrypt(string $data) : string
48
    {
49 6
        return $data;
50
    }
51
    
52
    /**
53
      * Decrypts the given data.
54
     *
55
     * @param String $data Data to decrypt.
56
     *
57
     * @return String decrypted data
58
     */
59 4
    public function decrypt(string $data) : string
60
    {
61 4
        return $data;
62
    }
63
64 8
    public function get_type() : string
65
    {
66 8
        return 'plain';
67
    }
68
}
69