diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index 73dfd2f124a459823e89a5b02571688b47a437ef..57ed6ae89883facecd22e22ecb453ee75d618565 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -919,7 +919,7 @@ class SimpleSAML_Utilities {
 	 * @param $bytes  Input string.
 	 * @return String with lowercase hexadecimal characters.
 	 */
-	public function stringToHex($bytes) {
+	public static function stringToHex($bytes) {
 		$ret = '';
 		for($i = 0; $i < strlen($bytes); $i++) {
 			$ret .= sprintf('%02x', ord($bytes[$i]));