Compare commits

...

3 commits

Author SHA1 Message Date
Antoni
10b4d3af12
Merge 0e1691ee4c into 88fa3ca1a0 2025-06-02 09:28:25 +03:00
Gravita
88fa3ca1a0 [FEATURE] Add url to HashedFile 2025-06-02 13:24:45 +07:00
microwin7
0e1691ee4c
Add Discord Widget 2023-05-19 22:40:26 +03:00
2 changed files with 13 additions and 2 deletions

View file

@ -20,6 +20,8 @@ public final class HashedFile extends HashedEntry {
public final long size;
@LauncherNetworkAPI
private final byte[] digest;
@LauncherNetworkAPI
public final String url;
public HashedFile(HInput input) throws IOException {
@ -30,6 +32,13 @@ public HashedFile(HInput input) throws IOException {
public HashedFile(long size, byte[] digest) {
this.size = VerifyHelper.verifyLong(size, VerifyHelper.L_NOT_NEGATIVE, "Illegal size: " + size);
this.digest = digest == null ? null : DIGEST_ALGO.verify(digest).clone();
this.url = null;
}
public HashedFile(long size, byte[] digest, String url) {
this.size = VerifyHelper.verifyLong(size, VerifyHelper.L_NOT_NEGATIVE, "Illegal size: " + size);
this.digest = digest == null ? null : DIGEST_ALGO.verify(digest).clone();
this.url = url;
}

View file

@ -1,4 +1,6 @@
# Modification of the launcher sashok724's v3 from Gravit [![Build Status](https://travis-ci.com/GravitLauncher/Launcher.svg?branch=master)](https://travis-ci.com/GravitLauncher/Launcher)
# Modification of the launcher sashok724's v3 from Gravit
[![Build Status](https://travis-ci.com/GravitLauncher/Launcher.svg?branch=master)](https://travis-ci.com/GravitLauncher/Launcher)
[![Join our Discord](https://img.shields.io/discord/853340557522370561.svg?logo=discord&label=)](https://discord.gg/b9QG4ygY75)
* [Discord channel](https://discord.gg/b9QG4ygY75)