From 304d4c33ae203b96ad4e01790d31a4787bda0d03 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 25 Jun 2006 04:21:58 +0000 Subject: [PATCH] add HexToBinary, move to RageUtil --- stepmania/src/CryptManager.cpp | 11 ----------- stepmania/src/RageUtil.cpp | 30 ++++++++++++++++++++++++++++++ stepmania/src/RageUtil.h | 2 ++ 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/stepmania/src/CryptManager.cpp b/stepmania/src/CryptManager.cpp index 1c0eb55610..327137a058 100644 --- a/stepmania/src/CryptManager.cpp +++ b/stepmania/src/CryptManager.cpp @@ -221,17 +221,6 @@ bool CryptManager::Verify( RString sPath, RString sSignature ) } #endif -static RString BinaryToHex( const unsigned char *string, int iNumBytes ) -{ - RString s; - for( int i=0; i arrayBits; diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index 1f169f8b60..1e10f9a51f 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -241,6 +241,8 @@ float fmodfp( float x, float y ); int power_of_two( int input ); bool IsAnInt( const RString &s ); bool IsHexVal( const RString &s ); +RString BinaryToHex( const unsigned char *string, int iNumBytes ); +bool HexToBinary( const RString &s, unsigned char *stringOut ); float HHMMSSToSeconds( const RString &sHMS ); RString SecondsToHHMMSS( float fSecs ); RString SecondsToMSSMsMs( float fSecs );