EncryptResult   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 62
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getSize() 0 3 1
A getKey() 0 3 1
A getNonce() 0 3 1
A getData() 0 3 1
1
<?php
2
/**
3
 * @author Threema GmbH
4
 * @copyright Copyright (c) 2015-2016 Threema GmbH
5
 */
6
7
8
namespace Threema\MsgApi\Tools;
9
10
/**
11
 * Result of a Data Encryption
12
 *
13
 * @package Threema\MsgApi\Tool
14
 */
15
class EncryptResult {
16
	/**
17
	 * @var string as binary
18
	 */
19
	private $data;
20
21
	/**
22
	 * @var string as binary
23
	 */
24
	private $key;
25
26
	/**
27
	 * @var string as binary
28
	 */
29
	private $nonce;
30
31
	/**
32
	 * @var int
33
	 */
34
	private $size;
35
36
	/**
37
	 * @param string $data (binary)
38
	 * @param string $key (binary)
39
	 * @param string $nonce (binary)
40
	 * @param int $size
41
	 */
42
	public function __construct($data, $key, $nonce, $size) {
43
		$this->data = $data;
44
		$this->key = $key;
45
		$this->nonce = $nonce;
46
		$this->size = $size;
47
	}
48
49
	/**
50
	 * @return int
51
	 */
52
	public function getSize() {
53
		return $this->size;
54
	}
55
56
	/**
57
	 * @return string (binary)
58
	 */
59
	public function getKey() {
60
		return $this->key;
61
	}
62
63
	/**
64
	 * @return string (binary)
65
	 */
66
	public function getNonce() {
67
		return $this->nonce;
68
	}
69
70
	/**
71
	 * @return string (binary)
72
	 */
73
	public function getData() {
74
		return $this->data;
75
	}
76
}
77