Hash model holding information about file like checksums and size.
More...
|
|
const | ALLOWED_KEYS = ['sha1', 'sha256', 'md5', 'size'] |
| |
Hash model holding information about file like checksums and size.
Definition at line 17 of file Hash.php.
◆ __construct()
| Fossology\UI\Api\Models\Hash::__construct |
( |
|
$sha1 = null, |
|
|
|
$md5 = null, |
|
|
|
$sha256 = null, |
|
|
|
$size = null |
|
) |
| |
Hash constructor.
- Parameters
-
| string | $sha1 | SHA1 checksum |
| string | $md5 | MD5 checksum |
| string | $sha256 | SHA256 checksum |
| integer | $size | Size of the file in bytes |
Definition at line 58 of file Hash.php.
◆ createFromArray()
| static Fossology\UI\Api\Models\Hash::createFromArray |
( |
|
$inputArray | ) |
|
|
static |
Creates Hash object from given array. If the input array contains additional keys, return NULL.
- Parameters
-
| array | $inputArray | Array to parse |
- Returns
- NULL|Hash NULL if input contains additional keys, Hash otherwise
Definition at line 125 of file Hash.php.
◆ getArray()
| Fossology\UI\Api\Models\Hash::getArray |
( |
| ) |
|
Get the object as associative array
- Returns
- array
Definition at line 108 of file Hash.php.
◆ getMd5()
| Fossology\UI\Api\Models\Hash::getMd5 |
( |
| ) |
|
- Returns
- string
Definition at line 90 of file Hash.php.
◆ getSha1()
| Fossology\UI\Api\Models\Hash::getSha1 |
( |
| ) |
|
- Returns
- string
Definition at line 74 of file Hash.php.
◆ getSha256()
| Fossology\UI\Api\Models\Hash::getSha256 |
( |
| ) |
|
- Returns
- string
Definition at line 82 of file Hash.php.
◆ getSize()
| Fossology\UI\Api\Models\Hash::getSize |
( |
| ) |
|
- Returns
- number
Definition at line 98 of file Hash.php.
◆ $md5
| string Fossology\UI\Api\Models\Hash::$md5 |
|
private |
MD5 checksum
Definition at line 42 of file Hash.php.
◆ $sha256
| string Fossology\UI\Api\Models\Hash::$sha256 |
|
private |
SHA256 checksum
Definition at line 36 of file Hash.php.
◆ $size
| int Fossology\UI\Api\Models\Hash::$size |
|
private |
Size in bytes
Definition at line 48 of file Hash.php.
The documentation for this class was generated from the following file: