I have a string, that can be received by calling
md5 = Digest::MD5.new
md5.update 'abc'
str = md5.to_s
# str == '900150983cd24fb0d6963f7d28e17f72'
I actually don't do so, I only receive this string as an input.
Now I want to receive a result similar to calling
md5.base64digest
# kAFQmDzST7DWlj99KOF/cg==
Summing up: I want to get base64digest of md5 having only digest.to_s
as in input.
Is it even possible?