WHEN 19 THEN 524288 -- 00000000000010000000000000000000 WHEN 20 THEN 1048576 -- 00000000000100000000000000000000 WHEN 21 THEN 2097152 -- 00000000001000000000000000000000 WHEN 22 THEN 4194304 -- 00000000010000000000000000000000 WHEN 23 THEN 8388608 -- 00000000100000000000000000000000 WHEN 24 THEN 16777216 -- 00000001000000000000000000000000 WHEN 25 THEN 33554432 -- 00000010000000000000000000000000 WHEN 26 THEN 67108864 -- 00000100000000000000000000000000 WHEN 27 THEN 134217728 -- 00001000000000000000000000000000 WHEN 28 THEN 268435456 -- 00010000000000000000000000000000 WHEN 29 THEN 536870912 -- 00100000000000000000000000000000 WHEN 30 THEN 1073741824 -- 01000000000000000000000000000000 ELSE 0 END RETURN(@iRes) END GO
IF EXISTS(SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MD5_LShift]') AND xtype IN(N'FN', N'IF', N'TF')) DROP FUNCTION [dbo].[MD5_LShift] GO /***************************************************************************** * Name: MD5_LShift * Description: MD5_LShift *****************************************************************************/ CREATE FUNCTION dbo.MD5_LShift( @iValue INT ,@iShiftBits TINYINT ) RETURNS INT WITH ENCRYPTION AS BEGIN DECLARE @iRes BIGINT SET @iRes = CAST(@iValue AS BINARY(8)) SET @iRes = @iRes * dbo.MD5_m_2Power(@iShiftBits) RETURN(CAST(@iRes & 0x00000000FFFFFFFF AS BINARY(4))) END GO
IF EXISTS(SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MD5_RShift]') AND xtype IN(N'FN', N'IF', N'TF')) DROP FUNCTION [dbo].[MD5_RShift] GO /***************************************************************************** * Name: MD5_RShift * Description: MD5_RShift *****************************************************************************/ CREATE FUNCTION dbo.MD5_RShift( @iValue INT ,@iShiftBits TINYINT ) RETURNS INT WITH ENCRYPTION AS BEGIN DECLARE @iRes BIGINT SET @iRes = CAST(@iValue AS BINARY(8)) SET @iRes = @iRes / dbo.MD5_m_2Power(@iShiftBits) RETURN(CAST(@iRes & 0x00000000FFFFFFFF AS BINARY(4))) END GO
IF EXISTS(SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MD5_RotateLeft]') AND xtype IN(N'FN', N'IF', N'TF'))
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] 下一页 |