* @copyright 2015 Klarna AB * @license http://www.apache.org/licenses/LICENSE-2.0 Apache license v2.0 * @link http://developers.klarna.com/ */ /** * Class to handle the digesting of hash string * * @category Payment * @package Klarna_Checkout * @author Rickard D. * @author Christer G. * @copyright 2015 Klarna AB * @license http://www.apache.org/licenses/LICENSE-2.0 Apache license v2.0 * @link http://developers.klarna.com/ */ class Klarna_Checkout_Digest { /** * Create a digest from a supplied string * * @param string $digestString string to hash * * @return string Base64 and SHA256 hashed string */ public function create($digestString) { return base64_encode(hash('sha256', $digestString, true)); } }