You do want to use Dependency Injection to inject ICrypto. The following in app.php will inject the required classes into your user backend class. You can get the ICrypto object with \OC::$server->getCrypto()
Then in the constructor take the arguments, assign it to a local member variable and use it later with $this->crypto->encrypt():
This first part was helpful because I could use this “out of the box” within the class. The structure of my app is different to yours (I took this from user_external) so I’m gonna change this from scratch to improve it.