Const sBASE_64_CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
' --------------------------------------
' ---------------------------------------
function Base64decode(ByVal asContents)
Dim lsResult
Dim lnPosition
Dim lsGroup64, lsGroupBinary
Dim Char1, Char2, Char3, Char4
Dim Byte1, Byte2, Byte3
if Len(asContents) Mod 4 > 0 Then asContents = asContents & String(4 - (Len(asContents) Mod 4), " ")
lsResult = ""
For lnPosition = 1 To Len(asContents) Step 4
lsGroupBinary = ""
lsGroup64 = Mid(asContents, lnPosition, 4)
Char1 = INSTR(sBASE_64_CHARACTERS, Mid(lsGroup64, 1, 1)) - 1
Char2 = INSTR(sBASE_64_CHARACTERS, Mid(lsGroup64, 2, 1)) - 1
Char3 = INSTR(sBASE_64_CHARACTERS, Mid(lsGroup64, 3, 1)) - 1
Char4 = INSTR(sBASE_64_CHARACTERS, Mid(lsGroup64, 4, 1)) - 1
Byte1 = Chr(((Char2 And 48) \ 16) Or (Char1 * 4) And &HFF)
Byte2 = lsGroupBinary & Chr(((Char3 And 60) \ 4) Or (Char2 * 16) And &HFF)
Byte3 = Chr((((Char3 And 3) * 64) And &HFF) Or (Char4 And 63))
lsGroupBinary = Byte1 & Byte2 & Byte3
lsResult = lsResult + lsGroupBinary
Next
Base64decode = lsResult
End function
' --------------------------------------
' ---------------------------------------
function Base64encode(ByVal asContents)
Dim lnPosition
Dim lsResult
Dim Char1
Dim Char2
Dim Char3
Dim Char4
Dim Byte1
Dim Byte2
Dim Byte3
Dim SaveBits1
Dim SaveBits2
Dim lsGroupBinary
Dim lsGroup64
if Len(asContents) Mod 3 > 0 Then asContents = asContents & String(3 - (Len(asContents) Mod 3), " ")
lsResult = ""
For lnPosition = 1 To Len(asContents) Step 3
lsGroup64 = ""
lsGroupBinary = Mid(asContents, lnPosition, 3)
Byte1 = Asc(Mid(lsGroupBinary, 1, 1)): SaveBits1 = Byte1 And 3
Byte2 = Asc(Mid(lsGroupBinary, 2, 1)): SaveBits2 = Byte2 And 15
Byte3 = Asc(Mid(lsGroupBinary, 3, 1))
Char1 = Mid(sBASE_64_CHARACTERS, ((Byte1 And 252) \ 4) + 1, 1)
Char2 = Mid(sBASE_64_CHARACTERS, (((Byte2 And 240) \ 16) Or (SaveBits1 * 16) And &HFF) + 1, 1)
Char3 = Mid(sBASE_64_CHARACTERS, (((Byte3 And 192) \ 64) Or (SaveBits2 * 4) And &HFF) + 1, 1)
Char4 = Mid(sBASE_64_CHARACTERS, (Byte3 And 63) + 1, 1)
lsGroup64 = Char1 & Char2 & Char3 & Char4
lsResult = lsResult + lsGroup64
Next
Base64encode = lsResult
End function
' --------------------------------------
' ---------------------------------------
― dean? (deangulberry), Saturday, 17 July 2004 21:50 (twenty-one years ago)
Quebec teen missing 3 years won't go back to family
Last Updated Tue, 20 Jul 2004 18:32:16 EDTBEAUCEVILLE, QUE. - The teen who disappeared in 2001 before resurfacing Sunday less than an hour's distance from her home in Quebec is refusing to return to her family, the man who sheltered her for almost three years said Tuesday.
The man, who spoke on condition of anonymity, told to Radio Canada he was applying for legal guardianship of the 17-year-old woman.
He said he has been "like a big brother" to Julie Bureau, who is now in the custody of Eastern Townships youth protection officials.
The 38 year-old man said he was the most competent person to care for the girl he knew as "Nancy," because of his close relationship with her.
Child protection officials said Bureau was in good health, and had not been involved in any criminal activity while she was missing.
Bureau's lawyer also said the girl had not been sexually involved with anyone.
The man said Bureau mowed the lawn, gathered branches or earned extra money babysitting his young child and other children in the neighbourhood.
At a local factory where she sometimes worked, Bureau was known by the name Audrey.
The man says he only realized Bureau was a minor who had been reported missing when police knocked on his door at 4 a.m. on Sunday.
He claimed they had a good life together. "We didn't lack for anything. We went out. We had a lot of plans. We wanted to buy two horses, rebuild a barn, have a little property. It was a dream for her," he said.
Written by CBC News Online staff
― dean? (deangulberry), Wednesday, 21 July 2004 01:03 (twenty-one years ago)