I am currently working on a encryption and decryption service for my application, using Google Tink. The problem is the following: I want to program it without using (nearly) duplicate code and therefore I had the idea of using generics. If parsing the Strings to a byte[] is the only option I will be doing that, but I’d rather not.