@@ -696,7 +696,7 @@ namespace SharedUtil
696
696
return GenerateHashHexString (hashFunction, NULL , 0 );
697
697
}
698
698
699
- inline void encodeXtea (unsigned int * v, unsigned int * w, unsigned int * k)
699
+ void encodeXtea (unsigned int * v, unsigned int * w, unsigned int * k)
700
700
{
701
701
unsigned int v0 = v[0 ], v1 = v[1 ], i, sum = 0 ;
702
702
unsigned int delta = 0x9E3779B9 ;
@@ -710,7 +710,7 @@ namespace SharedUtil
710
710
w[1 ] = v1;
711
711
}
712
712
713
- inline void decodeXtea (unsigned int * v, unsigned int * w, unsigned int * k)
713
+ void decodeXtea (unsigned int * v, unsigned int * w, unsigned int * k)
714
714
{
715
715
unsigned int v0 = v[0 ], v1 = v[1 ], i, sum = 0xC6EF3720 ;
716
716
unsigned int delta = 0x9E3779B9 ;
@@ -818,26 +818,5 @@ namespace SharedUtil
818
818
819
819
out->assign ((char *)buffer, numPasses * 4 );
820
820
delete[] buffer;
821
-
822
-
823
- // Delete all 0's from the end
824
- // As of now, even if the user passed it in
825
- // We'll delete it, because there's no way
826
- // We can know if the user added the padding or not.
827
-
828
- // Note: If we get there, there's at least 1 block(4 chars)
829
- // before out->end()
830
- {
831
- // Traverse the string until the beginning, or until the fist non-0 char
832
- auto iter = out->end ();
833
- for (; iter != out->begin (); iter--)
834
- {
835
- if (*std::prev (iter) != 0 )
836
- break ;
837
- }
838
-
839
- if (iter != out->end ())
840
- out->erase (iter, out->end ()); // Erase all 0s
841
- }
842
821
}
843
822
} // namespace SharedUtil
0 commit comments