| rdfs:comment
| - An implementation of the SHA-1 hash algorithm. First version, might still contain bugs. Function HexDefaultSHA1(Message() As Byte) As String Returns the SHA-1 hash of Message using the default key as a string of hexadecimal numbers. Function HexSHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal Key3 As Long, ByVal Key4 As Long) As String Returns the SHA-1 hash of Message using the key specified by Key1 ... Key4 as a string of hexadecimal numbers. Sub DefaultSHA1(Message() As Byte, H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long) Returns the SHA-1 hash of Message using the default key in H1 ... H5. Sub SHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal Key3 As Long, ByVal Key4 As Long, H1 As Long, H2 As Long, H3 As Long, H4 As Lon
|
| abstract
| - An implementation of the SHA-1 hash algorithm. First version, might still contain bugs. Function HexDefaultSHA1(Message() As Byte) As String Returns the SHA-1 hash of Message using the default key as a string of hexadecimal numbers. Function HexSHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal Key3 As Long, ByVal Key4 As Long) As String Returns the SHA-1 hash of Message using the key specified by Key1 ... Key4 as a string of hexadecimal numbers. Sub DefaultSHA1(Message() As Byte, H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long) Returns the SHA-1 hash of Message using the default key in H1 ... H5. Sub SHA1(Message() As Byte, ByVal Key1 As Long, ByVal Key2 As Long, ByVal Key3 As Long, ByVal Key4 As Long, H1 As Long, H2 As Long, H3 As Long, H4 As Long, H5 As Long) Returns the SHA-1 hash of Message using the key specified by Key1 ... Key4 in H1 ... H5. This module was originally written as a replacement for a similar module by John Taylor. However, this module should be more efficient, and it uses Byte arrays instead of strings for the message, which makes it suitable for digesting binary data, or text containing international characters. Note that if you coerce a String into a Byte array, Visual Basic will copy the actual data bytes of the string, which is stored as a sequence of 16 bit Unicode character codes. That means that every character takes two bytes. If this doesn't suit your needs, you'll have to convert the string yourself, for example using the StrConv function.B9A171
|