public static function generateSmtpPassword(CredentialsInterface $creds) { static $version = ""; static $algo = 'sha256'; static $message = 'SendRawEmail'; $signature = hash_hmac($algo, $message, $creds->getSecretKey(), true); return base64_encode($version . $signature); }