[ActiveLock-Development] CVS: activelock2/src BlowFish.cls,1.2,1.3
Brought to you by:
ialkan
From: Thanh H. T. <th...@us...> - 2003-07-23 02:57:36
|
Update of /cvsroot/activelock/activelock2/src In directory sc8-pr-cvs1:/tmp/cvs-serv4606 Modified Files: BlowFish.cls Log Message: Updated header comments. Index: BlowFish.cls =================================================================== RCS file: /cvsroot/activelock/activelock2/src/BlowFish.cls,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- BlowFish.cls 8 Jul 2003 03:26:44 -0000 1.2 +++ BlowFish.cls 23 Jul 2003 02:57:34 -0000 1.3 @@ -11,29 +11,55 @@ Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True -' /////////////////////////////////////////////////////////////////////// -' / Filename: Blowfish.cls / -' / Version: 1.0.0.1 / -' / Purpose: Store keys in a license file. / -' / (C) 2000 Fredrik Qvarfort / -' / / -' / Date Created: June 16, 2000 - FQ / -' / Date Last Modified: July 07, 2003 - MEC / -' /////////////////////////////////////////////////////////////////////// -' +'* ActiveLock +'* Copyright 2000 Fredrik Qvarfort +'* Copyright 1998-2002 Nelson Ferraz +'* Copyright 2003 The ActiveLock Software Group (ASG) +'* All material is the property of the contributing authors. +'* +'* Redistribution and use in source and binary forms, with or without +'* modification, are permitted provided that the following conditions are +'* met: +'* +'* [o] Redistributions of source code must retain the above copyright +'* notice, this list of conditions and the following disclaimer. +'* +'* [o] Redistributions in binary form must reproduce the above +'* copyright notice, this list of conditions and the following +'* disclaimer in the documentation and/or other materials provided +'* with the distribution. +'* +'* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +'* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +'* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +'* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +'* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +'* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +'* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +'* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +'* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +'* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +'* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +'* +'* + +'' +' This class implements BlowFish encryption algorithm. +' Information concerning the Blowfish algorithm can be found at: +' http://www.counterpane.com/blowfish.html +' @author fqvarfort +' @version 1.0.0 +' @date 20000616 ' +'* /////////////////////////////////////////////////////////////////////// +' / MODULE TO DO LIST / ' /////////////////////////////////////////////////////////////////////// -' / MODULE DESCRIPTION / -' /////////////////////////////////////////////////////////////////////// -' -' Information concerning the Blowfish -' algorithm can be found at: http://www.counterpane.com/blowfish.html -' ' +' [ ] + ' /////////////////////////////////////////////////////////////////////// ' / MODULE CODE BEGINS BELOW THIS LINE / ' /////////////////////////////////////////////////////////////////////// - Option Explicit 'For progress notifications @@ -341,11 +367,11 @@ If (CurrPercent <> 100) Then RaiseEvent Progress(100) End Sub -Private Static Function F(ByVal X As Long) As Long +Private Static Function F(ByVal x As Long) As Long Dim xb(0 To 3) As Byte - Call CopyMem(xb(0), X, 4) + Call CopyMem(xb(0), x, 4) If (m_RunningCompiled) Then F = (((m_sBox(0, xb(3)) + m_sBox(1, xb(2))) Xor m_sBox(2, xb(1))) + m_sBox(3, xb(0))) Else |