Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following hash calculations are supported:

This library is maintained by CodeDead. You can find more about us using the following links:
* [Website](https://codedead.com)
* [Twitter](https://twitter.com/C0DEDEAD)
* [Bluesky](https://bsky.app/profile/codedead.com)
* [Facebook](https://facebook.com/deadlinecodedead)

Copyright © 2024 CodeDead
Copyright © 2025 CodeDead
14 changes: 7 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdk 34
compileSdk 35
defaultConfig {
applicationId "com.codedead.deadhash"
minSdk 28
targetSdk 34
minSdk 30
targetSdk 35
versionName '1.8.2'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
versionCode 12
Expand All @@ -27,12 +27,12 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1', {
androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference:1.2.1'
testImplementation 'junit:junit:4.13.2'
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
android:theme="@style/Theme.DeadHash.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public HashData[] newArray(final int size) {
throw new NullPointerException("Hash name cannot be null!");
if (hashData == null)
throw new NullPointerException("Hash data cannot be null!");
if (hashName.length() == 0)
if (hashName.isEmpty())
throw new IllegalArgumentException("Hash name cannot be empty!");
if (hashData.length() == 0)
if (hashData.isEmpty())
throw new IllegalArgumentException("Hash data cannot be empty!");

this.hashName = hashName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static class DataHolder extends RecyclerView.ViewHolder implements View.OnClickL

copyData.setOnClickListener(this);
compareData.setOnClickListener(v1 -> {
if (originalCompare == null || originalCompare.length() == 0) return;
if (originalCompare == null || originalCompare.isEmpty()) return;
if (originalCompare.equals(encryptionData.getText().toString())) {
Toast.makeText(v1.getContext(), R.string.toast_hash_match, Toast.LENGTH_SHORT).show();
} else {
Expand Down Expand Up @@ -105,7 +105,7 @@ void bindData(final HashData data) {
encryptionName.setText(data.getHashName());
encryptionData.setText(data.getHashData());

if (data.getCompareCheck() != null && data.getCompareCheck().length() != 0) {
if (data.getCompareCheck() != null && !data.getCompareCheck().isEmpty()) {
originalCompare = data.getCompareCheck();
if (data.getHashData().equalsIgnoreCase(data.getCompareCheck())) {
compareData.setImageResource(R.drawable.ic_compare_check);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void openSite(final Context context, final String site) {
throw new NullPointerException("Context cannot be null!");
if (site == null)
throw new NullPointerException("Site cannot be null!");
if (site.length() == 0)
if (site.isEmpty())
throw new IllegalArgumentException("Site cannot be empty!");

try {
Expand Down
44 changes: 41 additions & 3 deletions app/src/main/java/com/codedead/deadhash/gui/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ protected void onCreate(final Bundle savedInstanceState) {
}
}
});

final Intent intent = getIntent();
final String action = intent.getAction();
final String type = intent.getType();

if (Intent.ACTION_SEND.equals(action) && type != null) {
handleSendFile(intent);
}
}

/**
Expand All @@ -181,13 +189,43 @@ private void loadTheme() {
}
}

/**
* Handle the sending of a file
*
* @param intent The {@link Intent} object
*/
private void handleSendFile(final Intent intent) {
final Uri intentFileUri = intent.getParcelableExtra(Intent.EXTRA_STREAM);
if (intentFileUri != null) {
fileUri = intentFileUri;
try (final Cursor cursor = this.getContentResolver()
.query(intentFileUri, null, null, null, null, null)) {
if (cursor != null && cursor.moveToFirst()) {
@SuppressLint("Range") final String displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
edtFilePath.setText(displayName);

fileDataArrayList.clear();
mAdapterFile.notifyDataSetChanged();
}
}
} else {
Toast.makeText(getApplicationContext(), R.string.error_open_file, Toast.LENGTH_SHORT).show();
}
}

@Override
public boolean onCreateOptionsMenu(final Menu menu) {
final MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.top_menu, menu);
return true;
}

@Override
protected void onNewIntent(final Intent intent) {
super.onNewIntent(intent);
handleSendFile(intent);
}

@Override
public boolean onOptionsItemSelected(final MenuItem item) {
final int itemId = item.getItemId();
Expand Down Expand Up @@ -406,7 +444,7 @@ private void loadTextHashContent(final Bundle savedInstance) {
fileDataArrayList.clear();
mAdapterText.notifyDataSetChanged();

if (edtTextData.getText() == null || edtTextData.getText().toString().length() == 0) {
if (edtTextData.getText() == null || edtTextData.getText().toString().isEmpty()) {
Toast.makeText(MainActivity.this, R.string.toast_error_notext, Toast.LENGTH_SHORT).show();
return;
}
Expand Down Expand Up @@ -483,13 +521,13 @@ private void loadHelpContent() {
*/
private void loadAboutContent() {
final ImageButton btnFacebook = findViewById(R.id.BtnFacebook);
final ImageButton btnTwitter = findViewById(R.id.BtnTwitter);
final ImageButton btnBluesky = findViewById(R.id.BtnBluesky);
final ImageButton btnWebsite = findViewById(R.id.BtnWebsiteAbout);
final TextView txtAbout = findViewById(R.id.TxtAbout);

btnWebsite.setOnClickListener(v -> IntentUtils.openSite(v.getContext(), "http://codedead.com/"));
btnFacebook.setOnClickListener(v -> IntentUtils.openSite(v.getContext(), "https://facebook.com/deadlinecodedead"));
btnTwitter.setOnClickListener(v -> IntentUtils.openSite(v.getContext(), "https://twitter.com/C0DEDEAD"));
btnBluesky.setOnClickListener(v -> IntentUtils.openSite(v.getContext(), "https://bsky.app/profile/codedead.com"));
txtAbout.setMovementMethod(LinkMovementMethod.getInstance());
}

Expand Down
Binary file removed app/src/main/res/drawable-hdpi/ic_twitter_icon.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/ic_twitter_icon.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/ic_twitter_icon.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/ic_twitter_icon.png
Binary file not shown.
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/bluesky_logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="32dp" android:viewportHeight="530" android:viewportWidth="600" android:width="32dp">

<path android:fillColor="#1185fe" android:pathData="m135.72,44.03c66.5,49.92 138.02,151.14 164.28,205.46 26.26,-54.32 97.78,-155.54 164.28,-205.46 47.98,-36.02 125.72,-63.89 125.72,24.8 0,17.71 -10.15,148.79 -16.11,170.07 -20.7,73.98 -96.14,92.85 -163.25,81.43 117.3,19.96 147.14,86.09 82.7,152.22 -122.39,125.59 -175.91,-31.51 -189.63,-71.77 -2.51,-7.38 -3.69,-10.83 -3.71,-7.9 -0.02,-2.94 -1.19,0.52 -3.71,7.9 -13.71,40.26 -67.23,197.36 -189.63,71.77 -64.44,-66.13 -34.6,-132.26 82.7,-152.22 -67.11,11.42 -142.55,-7.45 -163.25,-81.43 -5.96,-21.28 -16.11,-152.36 -16.11,-170.07 0,-88.69 77.74,-60.82 125.72,-24.8z"/>

</vector>
8 changes: 4 additions & 4 deletions app/src/main/res/layout/content_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@
<ImageButton
android:id="@+id/BtnFacebook"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:contentDescription="@string/hint_facebook_logo"
app:srcCompat="@drawable/ic_facebook_icon" />

<ImageButton
android:id="@+id/BtnTwitter"
android:id="@+id/BtnBluesky"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:contentDescription="@string/hint_twitter_logo"
app:srcCompat="@drawable/ic_twitter_icon" />
android:contentDescription="@string/hint_bluesky_logo"
app:srcCompat="@drawable/bluesky_logo" />

<ImageButton
android:id="@+id/BtnWebsiteAbout"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<string name="nav_tools">Werkzeuge</string>
<string name="navigation_drawer_close">Schliessschloss schließen</string>
<string name="navigation_drawer_open">Öffnen Sie die Schublade</string>
<string name="text_about">DeadHash wurde von DeadLine erstellt. Diese App kann verwendet werden, um Hashes von Dateien und Strings zu erzeugen.\n\nIn dieser Version sind keine Anzeigen oder Tracking-Geräte enthalten. Alle erforderlichen Berechtigungen sind erforderlich, um diese App richtig nutzen zu können.\n\nAlle Bilder sind mit freundlicher Genehmigung von Google.\n\nCopyright © 2024 CodeDead</string>
<string name="text_about">DeadHash wurde von DeadLine erstellt. Diese App kann verwendet werden, um Hashes von Dateien und Strings zu erzeugen.\n\nIn dieser Version sind keine Anzeigen oder Tracking-Geräte enthalten. Alle erforderlichen Berechtigungen sind erforderlich, um diese App richtig nutzen zu können.\n\nAlle Bilder sind mit freundlicher Genehmigung von Google.\n\nCopyright © 2025 CodeDead</string>
<string name="text_compare">Vergleichen:</string>
<string name="text_compare_hash">Hash vergleichen</string>
<string name="text_compare_hint">Lege deinen Hash hier</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<string name="text_compare">Comparer:</string>
<string name="navigation_drawer_open">Ouvrir le tiroir de navigation</string>
<string name="navigation_drawer_close">Fermer le tiroir de navigation</string>
<string name="text_about">DeadHash a été créé par DeadLine. Cette application peut être utilisée pour générer des hachages de fichiers et de chaînes.\n\nAucune publicité ou périphérique de suivi n\'est inclus dans cette version. Toutes les autorisations requises sont nécessaires pour utiliser correctement cette application.\n\nToutes les images sont gracieusement fournies par Google.\n\nCopyright © 2024 CodeDead</string>
<string name="text_about">DeadHash a été créé par DeadLine. Cette application peut être utilisée pour générer des hachages de fichiers et de chaînes.\n\nAucune publicité ou périphérique de suivi n\'est inclus dans cette version. Toutes les autorisations requises sont nécessaires pour utiliser correctement cette application.\n\nToutes les images sont gracieusement fournies par Google.\n\nCopyright © 2025 CodeDead</string>
<string name="text_help">La génération de hachages de fichiers ne peut être effectuée que lorsque DeadHash a été autorisé à lire votre stockage. Génération hash pour des fichiers plus volumineux peut prendre un certain temps. Cela dépend entièrement du pouvoir de traitement de votre appareil.\n\nLa génération de hachages de texte ne nécessite aucune autorisation supplémentaire. La génération de hachis pour un texte plus grand peut prendre un certain temps. Cela dépend entièrement du pouvoir de traitement de votre appareil.\n\nSi vous rencontrez un bug ou si vous avez besoin de soutien, vous pouvez toujours nous contacter!</string>
<string name="text_send_mail">Envoyez-nous un e-mail</string>
<string name="alert_review_text">Envisagez de laisser un commentaire si vous aimez cette application!</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<string name="button_support">Supporto</string>
<string name="text_help">La generazione di hash di file può essere eseguita solo quando DeadHash è stato autorizzato a leggere la propria memoria. La generazione di hash per file più grandi può richiedere un po \'di tempo. Questo dipende interamente dalla potenza di elaborazione del dispositivo.\n\nLa generazione di hash di testo non richiede autorizzazioni aggiuntive. La generazione di hash per stringhe più grandi può richiedere un po \'di tempo. Ciò dipende interamente dalla potenza di elaborazione del dispositivo.\n\nSe si verifica un errore o se hai bisogno di supporto, puoi sempre contattarci!</string>
<string name="nav_tools">Strumenti</string>
<string name="text_about">DeadHash è stato creato da DeadLine. Questa applicazione può essere utilizzata per generare hash di file e stringhe.\n\nNon sono inclusi dispositivi di pubblicità o di rilevamento in questa versione. Tutte le autorizzazioni richieste sono necessarie per utilizzare correttamente questa applicazione.\n\nTutte le immagini sono a cura di Google.\n\nCopyright © 2024 CodeDead</string>
<string name="text_about">DeadHash è stato creato da DeadLine. Questa applicazione può essere utilizzata per generare hash di file e stringhe.\n\nNon sono inclusi dispositivi di pubblicità o di rilevamento in questa versione. Tutte le autorizzazioni richieste sono necessarie per utilizzare correttamente questa applicazione.\n\nTutte le immagini sono a cura di Google.\n\nCopyright © 2025 CodeDead</string>
<string name="text_language">Lingua</string>
<string name="text_send_mail">Inviaci una e-mail</string>
<string name="alert_review_title">Recensione</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-kk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<string name="button_support">Сұрақ қою</string>
<string name="text_help">Файл хешін есептеу үшін DeadHash құрылғы жадын оқуға рұқсат алуы керек. Үлкен файлдың хешін есептеуге біраз уақыт кетуі мүмкін. Хештеу уақыты құрылғыңыздың өнімділігіне ғана байланысты.\n\nМәтін хешін есептеу үшін еш қосымша рұқсат қажет емес. Ұзын мәтіннің хеші де құрылғыңыздың өнімділігіне қарай ұзағырақ есептелуі мүмкін.\n\nҚатеге тап болсаңыз немесе көмек керек болса, бізге хабарласа аласыз.</string>
<string name="nav_tools">Құралдар</string>
<string name="text_about">DeadHash қолданбасын DeadLine жасаған. Оның көмегімен файл не мәтіннің хешін есептеуге болады.\n\nҚолданбаның осы нұсқасында жарнама мен бақылау құралдары жоқ. Барлық сұралған рұқсат қолданба дұрыс жұмыс істеуі үшін қажет.\n\nБарлық сурет Google рұқсатымен қолданылады.\nАудармалар: <a href="https://github.com/Fontan030">Fontan030</a>\n\nCopyright © 2024 CodeDead</string>
<string name="text_about">DeadHash қолданбасын DeadLine жасаған. Оның көмегімен файл не мәтіннің хешін есептеуге болады.\n\nҚолданбаның осы нұсқасында жарнама мен бақылау құралдары жоқ. Барлық сұралған рұқсат қолданба дұрыс жұмыс істеуі үшін қажет.\n\nБарлық сурет Google рұқсатымен қолданылады.\nАудармалар: <a href="https://github.com/Fontan030">Fontan030</a>\n\nCopyright © 2025 CodeDead</string>
<string name="text_language">Тіл</string>
<string name="text_send_mail">Бізге хат жіберу</string>
<string name="alert_review_title">Пікір қалдыру</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<string name="nav_tools">Gereedschap</string>
<string name="navigation_drawer_close">Sluit navigatie lade</string>
<string name="navigation_drawer_open">Open navigatie lade</string>
<string name="text_about">DeadHash werd gemaakt door DeadLine. Deze app kan gebruikt worden om hashes te genereren van bestanden en tekst.\n\nAdvertenties of trackers werden niet toegevoegd in deze release. Alle aangevraagde permissies zijn nodig om de app correct te laten functioneren.\n\nAlle gebruikte afbeeldingen waren gemaakt door Google.\n\nCopyright © 2024 CodeDead</string>
<string name="text_about">DeadHash werd gemaakt door DeadLine. Deze app kan gebruikt worden om hashes te genereren van bestanden en tekst.\n\nAdvertenties of trackers werden niet toegevoegd in deze release. Alle aangevraagde permissies zijn nodig om de app correct te laten functioneren.\n\nAlle gebruikte afbeeldingen waren gemaakt door Google.\n\nCopyright © 2025 CodeDead</string>
<string name="text_compare">Vergelijk:</string>
<string name="text_compare_hash">Vergelijk hash</string>
<string name="text_compare_hint">Plaats uw hash hier</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<string name="button_support">Suporte</string>
<string name="text_help">A geração de hashes para arquivos só pode ser feita se o DeadHash tiver permissão para ler o seu armazenamento. A geração de hashes para arquivos grandes poderá demorar um pouco. Isso dependerá exclusivamente do poder de processamento do seu dispositivo.\n\nA geração de hashes para textos não necessita que nenhuma permissão seja concedida. A geração de hashes para textos grandes poderá demorar um pouco. Isso dependerá exclusivamente do poder de processamento do seu dispositivo.\n\nSe chegar à encontrar algum bug ou precisar de suporte, você sempre poderá em contato conosco!</string>
<string name="nav_tools">Ferramentas</string>
<string name="text_about">DeadHash foi criado por DeadLine. Este aplicativo pode ser utilizado para gerar hashes de arquivos e textos.\n\nNenhum anúncio ou serviço de coleta de dados está incluído nesta versão. Todas as permissões requisitadas pelo aplicativo são necessárias para que ele funcione corretamente.\n\nTodas as imagens são cortesia do Google.\nTraduções fornecidas por <a href="https://github.com/SnwMds">SnwMds</a>\n\nCopyright © 2024 CodeDead</string>
<string name="text_about">DeadHash foi criado por DeadLine. Este aplicativo pode ser utilizado para gerar hashes de arquivos e textos.\n\nNenhum anúncio ou serviço de coleta de dados está incluído nesta versão. Todas as permissões requisitadas pelo aplicativo são necessárias para que ele funcione corretamente.\n\nTodas as imagens são cortesia do Google.\nTraduções fornecidas por <a href="https://github.com/SnwMds">SnwMds</a>\n\nCopyright © 2025 CodeDead</string>
<string name="text_language">Idioma</string>
<string name="text_send_mail">Envie-nos um e-mail</string>
<string name="alert_review_title">Avalie-nos</string>
Expand Down
Loading