Skip to content

Use cryptography-kotlin in the app itself also#3073

Open
Luna712 wants to merge 1 commit into
recloudstream:masterfrom
Luna712:app-cryptography-kotlin
Open

Use cryptography-kotlin in the app itself also#3073
Luna712 wants to merge 1 commit into
recloudstream:masterfrom
Luna712:app-cryptography-kotlin

Conversation

@Luna712

@Luna712 Luna712 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

It is more type safe and IMO cleaner code.

It is more type safe and IMO cleaner code.
@Luna712

Luna712 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Note: I have had this patch ready to go for quite awhile, but wanted to wait for the one that added the kotlinx-io dependency so I could use it. I can't fully remember just how much of this was actually fully tested so there may indeed be some potential issue with it.

// Disables ssl check
val sslContext: SSLContext = SSLContext.getInstance("TLS")
sslContext.init(null, arrayOf(SSLTrustManager()), SecureRandom())
sslContext.init(null, arrayOf(SSLTrustManager()), null)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this was just removed because it has the same behavior as far as I could tell, null just uses a default SecureRandom and we don't need to pass it so I thought we should just let it handle it there to remove all usage of SecureRandom. But it can be changed if really wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant