fb:porticula NoPaste
a piece of dofda1
Uploader: | csde_rats |
Datum/Zeit: | 26.11.2007 23:26:20 |
/'
DOFDA1
data or file digest algorithm 1
(c) 2007 Marian Beermann
aka csde_rats
'/
#Include "dofda1.bi"
Function dofda1_createnewobject() As dofda1_desc Export
Dim Object As dofda1_desc
With Object
.DOFDA_VER = ThisDOFDA1Version
.DOFDA_BLOCKS = 0
End With
Return Object
End Function
Function dofda1_createnewblock(iNum As Integer) As dofda1_block Export
Dim Block As dofda1_block
With Block
.num = iNum
For iCount As Integer = 0 To BlockLen
.dat(iCount) = 0
Next
.sHash = String(HashLen, EmptyChar)
End With
Return Block
End Function
Function dofda1_destroyobject(Object As dofda1_desc) As Boolean Export
With Object
.DOFDA_VER = &h00
.DOFDA_BLOCKS = 0
End With
Return TRUE
End Function
Function dofda1_destroyblock(Block As dofda1_block) As Boolean Export
With Block
.num = 0
For iCount As Integer = 0 To BlockLen
.dat(iCount) = 0
Next
.sHash = String(HashLen, EmptyChar)
End With
Return TRUE
End Function