Digest+encoding implementation should be extracted into a common method in ``klarna.rb`` to avoid duplication.