Hash::sha256d()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace mattvb91\TronTrx\Support;
4
5
/**
6
 * @codeCoverageIgnore
7
 */
8
class Hash
9
{
10
    public static function SHA256(string $data, $raw = true): string
11
    {
12
        return hash('sha256', $data, $raw);
13
    }
14
15
    public static function sha256d(string $data): string
16
    {
17
        return hash('sha256', hash('sha256', $data, true), true);
18
    }
19
20
    public static function RIPEMD160(string $data, $raw = true): string
21
    {
22
        return hash('ripemd160', $data, $raw);
23
    }
24
}