I was surprised to find that Jatpack Security provides only support for File and SharedPreferences encryption. But I need to be able to encrypt and decrypt Strings because I want to use the AccountManager and to store refresh and access tokens and, as suggested in the official documentation, this kind of data should be send encrypted to the AccountManager:

Searching online there are plenty of tutorial on how to encrypt Strings on Android but most of them seems to be pretty old and I'm afraid to pick the wrong one that could lead to this kind of warnings on the Play Store Console:

So, what would be the right and safe way to encrypt Strings in an Android application in 2021? Can Jetpack Security still be used to some extend (perhaps to generate the keys?) and why it does not support String encryption out of the box, but only Files and SharedPreferences?
After a deep look at the implementation of
EncryptedSharedPreferencesandEncryptedFile, I manage to create aCryptoHelperclass that, using the same approach of the 2 classes from Jetpack Security, provides a way to encrypt, decrypt, sign and verifyByteArrays:Don't forget to add
com.google.crypto.tink:tink-androidas implementation dependency, since Jetpack Security does not exposes it as api.