[-] abrahambelch@programming.dev 71 points 1 month ago

No Forking: You may not create, maintain, or distribute a forked version of the software. Lol 💀

[-] abrahambelch@programming.dev 20 points 1 month ago

It Feels Almost Like Android... But It Isn't

So what is it?

30
Strategy Pattern in Rust (programming.dev)
submitted 2 months ago* (last edited 2 months ago) by abrahambelch@programming.dev to c/rust@programming.dev

Hey there, I'm currently learning Rust (coming from object-oriented and also to some degree functional languages like Kotlin) and have some trouble how to design my software in a Rust-like way. I'm hoping someone could help me out with an explanation here :-)

I just started reading the book in order to get an overview of the language as well.

In OOP languages, I frequently use design patterns such as the Strategy pattern to model interchangeable pieces of logic.

How do I model this in Rust?

My current approach would be to define a trait and write different implementations of it. I would then pass around a boxed trait object (Box<dyn MyTrait>). I often find myself trying to combine this with some poor man's manual dependency injection.

This approach feels very object oriented and not native to the language. Would this be the recommended way of doing things or is there a better approach to take in Rust?

Thanks in advance!

[-] abrahambelch@programming.dev 21 points 3 months ago* (last edited 3 months ago)

First of all:

You can always copy storage if you're able to physically access it. The only way to prevent this is to secure the chip in a way it destroys itself if physically tampered with (like some TPM chips).

You should instead opt for a passphrase that is practically impossible to bruteforce on current hardware due to its complexity. Also, try not to disclose the encryption algorithm or software used as this information opens the possibility of exploiting known vulnerabilities.

VeraCrypt for example is able to completely hide its presence on a volume and the only way to know if a device is encrypted with it is trying to decrypt it using VeraCrypt with the correct passphrase.


Trying to answer your questions:

  1. Most modern smartphones encrypt their data by default nowadays. The rest depends on the phone itself. Mostly they just delete the encryption keys from the TPM when formatted so this still enables an authority to copy your storage and bruteforce.

  2. No. Encryption does never prevent you from copying the encrypted information. Those are two completely different things.

  3. No. You cannot encrypt the SD card with say Bitlocker and use it on a phone afaik.

  4. Yes, some Androids allow you to encrypt the SD card from within the storage settings.

[-] abrahambelch@programming.dev 21 points 3 months ago* (last edited 3 months ago)

Sometimes you have to learn the hard way...

[-] abrahambelch@programming.dev 27 points 3 months ago* (last edited 3 months ago)

I reverse engineered the Apple Photos library file on my Mac as a side project and can confirm that hidden assets are not actually encrypted or otherwise protected. The respective assets are just not shown in the apps and can be accessed via Finder on macOS.

I didn't know they were visible when you connect your phone to your PC but I guess it makes sense.

[-] abrahambelch@programming.dev 152 points 4 months ago* (last edited 4 months ago)

Don't make the same mistake as our generation and fall for TikTok, Instagram and that shit.

Almost everything is better without it, from concerts to weekend trips to relationships.

[-] abrahambelch@programming.dev 26 points 4 months ago* (last edited 4 months ago)

First thing: Privacy. I am aware that iOS is not entirely private too, but I trust Apple Photos much more than Google Photos. You can even enable end-to-end encryption iirc.

Second point is control over my data. I can easily export my photos from Apple Photos as files, whereas Google maliciously separates Photos and Metadata upon export. In my experience this is the same for a lot of other services as well. Being able to easily export my data enables me to escape the walled garden more easily should I get fed up with one system. I also try to use as many open source services as possible for this as well as other reasons.

Apple has a lot of malicious practices too, especially when it comes to EU citizens and third-party app stores, etc. - but in my experience Google is no better.

Lastly, I considered switching to an Android with Graphene OS (privacy focused Android derivate) a couple of times, but the added control over your data comes with a lot of other inconveniences. So for now, I’m just sticking to iOS.

[-] abrahambelch@programming.dev 38 points 4 months ago

It's not an Apple fanboy but imo it's a lot more transparent on their side. There's a switch for each and every service to use iCloud or not in the settings. Services don't just re-enable their usage of iCloud after some random update and most importantly, they don't just re-install apps you previously deleted. Or bloatware.

[-] abrahambelch@programming.dev 78 points 5 months ago

Which language uses these signs? It truly looks like some kind of alien language

[-] abrahambelch@programming.dev 27 points 6 months ago

Goose Farmer - Remote

[-] abrahambelch@programming.dev 22 points 7 months ago* (last edited 7 months ago)

Seriously, a grace period after which I won't be able to update my apps anymore? Enough is enough, my next phone will be a Fairphone, I'm tired of this bullshit

[-] abrahambelch@programming.dev 33 points 9 months ago

Yeah so effectively not federated. Pretty sure they're not actually interested in federating anyway

view more: next ›

abrahambelch

joined 9 months ago