Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A comprehensive, modular Android security library with biometrics, encryption, integrity, and Compose demo.

NotificationsYou must be signed in to change notification settings

programmer443/android-security-toolkit

Repository files navigation

A comprehensive, modular, and production-ready security toolkit for Android apps. Includes encryption, hashing, biometric authentication, keychain management, root/debugger/simulator/reverse engineering detection, app integrity checks, network security, random data generation, and screen shield features.

Features

  • Encryption: AES-128, AES-256
  • Hashing: MD5, SHA-1, SHA-256, SHA-512, HMAC-SHA256, HMAC-SHA512
  • Biometric Authentication: Face ID, Touch ID, fallback to device passcode
  • Keychain Management: Securely store, retrieve, update, and delete sensitive data
  • Root, Debugger, Simulator, Reverse Engineering Detection
  • App Integrity Checks: Code signing, file hashes, tampering
  • Network Security: Proxy/VPN detection, certificate pinning, SSL validation
  • Random Data Generation: Secure random strings, passwords, UUIDs, tokens
  • Screen Shield: Prevent screenshots, prevent screen recording, blur on background
  • Kotlin Coroutines: Async/await support for all major operations
  • Jetpack Compose compatible

Installation

Add the dependency to yourbuild.gradle:

implementation("com.yourorg:android-security-toolkit:latest-version")

Usage

Initialization

val appSecurity=AppSecurity.initialize(context)

Biometric Authentication (Jetpack Compose)

val activity= contextas?FragmentActivityif (appSecurity.isBiometricAvailable(activity)) {val biometricUtils= appSecurity.createBiometricUtils(        config= appSecurity.config.biometric,        activity= activity,        authCallback=object:BiometricUtils.AuthCallback {overridefunonAuthSuccessful(promptType:BiometricUtils.PromptType) {// Handle success            }overridefunonAuthError(promptType:BiometricUtils.PromptType,errorCode:Int,errString:CharSequence) {// Handle error            }overridefunonAuthFailed(promptType:BiometricUtils.PromptType) {// Handle failure            }        }    )    biometricUtils.displayBiometricPrompt(BiometricUtils.PromptType.ENABLE_BIOMETRIC_LOGIN)}

Encryption

val encrypted= appSecurity.encrypt("secret".toByteArray(),EncryptionAlgorithm.AES_256,"password")val decrypted= appSecurity.decrypt(encrypted,EncryptionAlgorithm.AES_256,"password")

Hashing

val hash= appSecurity.hash("my data",HashingAlgorithm.SHA_256)

Keychain Management

appSecurity.storeStringInKeychain("mySecret","keyAlias")val value= appSecurity.retrieveStringFromKeychain("keyAlias")

App Integrity Check

val isValid= appSecurity.verifyAppIntegrity()

Network Security

val isSecure= appSecurity.checkNetworkSecurity()

Screen Shield (Screenshot Restriction)

appSecurity.enableScreenShield(activity)

Screenshots

Add your screenshots to thescreenshots/ folder and reference them here:

Biometric Prompt

Security Dashboard

Contributing

Contributions are welcome! Please open issues and pull requests.

License

MIT License. SeeLICENSE for details.

Author

Maintained byMuhammad Ahmad

About

A comprehensive, modular Android security library with biometrics, encryption, integrity, and Compose demo.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp