diff options
author | Erich Eckner <git@eckner.net> | 2015-10-19 16:29:49 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2015-10-19 16:29:49 +0200 |
commit | a4c860b8898cc35690347fa8391485e37ef9ce15 (patch) | |
tree | 72f9550f7e4717497f5c8bad5b273009086cde0a /lowlevelunit.pas | |
parent | e2e79f311fc9da42af15dadda995614068abfa53 (diff) | |
download | units-a4c860b8898cc35690347fa8391485e37ef9ce15.tar.xz |
base64Decode kann nun auch zu longint dekodieren
Diffstat (limited to 'lowlevelunit.pas')
-rw-r--r-- | lowlevelunit.pas | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas index 3e1911f..eb54b39 100644 --- a/lowlevelunit.pas +++ b/lowlevelunit.pas @@ -80,7 +80,8 @@ procedure fehler(s: string); function hexDump(p: pointer; cnt: longint): string; function base64ToBin(var s: string): boolean; -function base64Decode(const s: string; out i: int64): boolean; +function base64Decode(const s: string; out i: int64): boolean; overload; +function base64Decode(const s: string; out i: longint): boolean; overload; var base64Chars: array[0..63] of char; @@ -682,7 +683,7 @@ begin result:=true; end; -function base64Decode(const s: string; out i: int64): boolean; +function base64Decode(const s: string; out i: int64): boolean; overload; var j: longint; b: byte; @@ -697,6 +698,17 @@ begin result:=true; end; +function base64Decode(const s: string; out i: longint): boolean; overload; +var + j: int64; +begin + result:=base64Decode(s,j); + if result then + i:=j + else + i:=0; +end; + var b: byte; begin |