Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
14
Task/Base64-decode-data/Ada/base64-decode-data.adb
Normal file
14
Task/Base64-decode-data/Ada/base64-decode-data.adb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
with Ada.Text_IO;
|
||||
|
||||
with AWS.Translator;
|
||||
|
||||
procedure Decode_AWS is
|
||||
Input : constant String :=
|
||||
"VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVw" &
|
||||
"IHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=";
|
||||
Result : constant String := AWS.Translator.Base64_Decode (Input);
|
||||
begin
|
||||
Ada.Text_IO.Put_Line (Input);
|
||||
Ada.Text_IO.New_Line;
|
||||
Ada.Text_IO.Put_Line (Result);
|
||||
end Decode_AWS;
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
certutil -f -decodehex "%temp%\favicon.tmp" favicon1.ico 1
|
||||
fc /B favicon.ico favicon1.ico
|
||||
9
Task/Base64-decode-data/Haxe/base64-decode-data.hx
Normal file
9
Task/Base64-decode-data/Haxe/base64-decode-data.hx
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class Main {
|
||||
static function main() {
|
||||
var data = "VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVw" +
|
||||
"IHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g=";
|
||||
Sys.println('$data\n');
|
||||
var decoded = haxe.crypto.Base64.decode(data);
|
||||
Sys.println(decoded);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
[Text.Encoding]::ASCII.GetString([Convert]::FromBase64String("VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIHVwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLSBQYXVsIFIuIEVocmxpY2g="))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
$bytes=...
|
||||
[IO.File]::WriteAllBytes('favicon.ico', [Convert]::FromBase64String($bytes))
|
||||
20
Task/Base64-decode-data/REXX/base64-decode-data-1.rexx
Normal file
20
Task/Base64-decode-data/REXX/base64-decode-data-1.rexx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
z= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
||||
do i=1 to 64
|
||||
bs.i=x2b(d2x(i-1))
|
||||
c=substr(z,i,1)
|
||||
ds.c=right(bs.i,6,0)
|
||||
End
|
||||
e='YW55IGNhcm5hbCBwbGVhc3VyZS4'
|
||||
r=''
|
||||
ec=e
|
||||
Do While ec<>''
|
||||
Parse Var ec c +1 ec
|
||||
r=r||ds.c
|
||||
End
|
||||
res=''
|
||||
Do while r<>''
|
||||
Parse Var r x +8 r
|
||||
res=res||x2c(b2x(x))
|
||||
End
|
||||
Say 'Input: >'e'<'
|
||||
Say 'decoded: >'res'<'
|
||||
56
Task/Base64-decode-data/REXX/base64-decode-data-2.rexx
Normal file
56
Task/Base64-decode-data/REXX/base64-decode-data-2.rexx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
-- 3 Oct 2025
|
||||
include Setting
|
||||
signal off notready
|
||||
|
||||
say 'BASE64 DECODE DATA'
|
||||
say version
|
||||
say
|
||||
call Task1 'TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsu'
|
||||
call Task1 'TWFu'
|
||||
call Task1 'TWE='
|
||||
call Task1 'TQ=='
|
||||
call Task1 'YW55IGNhcm5hbCBwbGVhc3VyZS4='
|
||||
call Task2
|
||||
exit
|
||||
|
||||
Task1:
|
||||
procedure
|
||||
parse arg xx
|
||||
say 'Encoded ' xx
|
||||
say 'Original' Decode64(xx)
|
||||
say
|
||||
return
|
||||
|
||||
Task2:
|
||||
procedure
|
||||
in='favicon.dat'; out='favcopy.ico'
|
||||
rr=Decode64(Charin(in,1,30000))
|
||||
call Charout out,rr,1
|
||||
return
|
||||
|
||||
Decode64:
|
||||
procedure
|
||||
parse arg xx
|
||||
-- Alphabet
|
||||
a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
||||
lx=Length(xx)
|
||||
rr=''
|
||||
-- Loop thru encoded characters
|
||||
do i=1 to lx
|
||||
c=Substr(xx,i,1)
|
||||
-- If padding, discard 2 bits
|
||||
if c='=' then do
|
||||
rr=Left(rr,Length(rr)-2)
|
||||
iterate i
|
||||
end
|
||||
-- Find position in alphabet
|
||||
p=Pos(c,a)-1
|
||||
-- Convert to bits and take last 6
|
||||
b=Right(0000||X2b(D2x(p)),6)
|
||||
-- Append
|
||||
rr||=b
|
||||
end
|
||||
-- Convert to character
|
||||
return X2c(B2x(rr))
|
||||
|
||||
include Abend
|
||||
3
Task/Base64-decode-data/Rebol/base64-decode-data.rebol
Normal file
3
Task/Base64-decode-data/Rebol/base64-decode-data.rebol
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
print to string! debase {
|
||||
VG8gZXJyIGlzIGh1bWFuLCBidXQgdG8gcmVhbGx5IGZvdWwgdGhpbmdzIH
|
||||
VwIHlvdSBuZWVkIGEgY29tcHV0ZXIuCiAgICAtLVBhdWwgUi5FaHJsaWNo} 64
|
||||
4
Task/Base64-decode-data/YAMLScript/base64-decode-data.ys
Normal file
4
Task/Base64-decode-data/YAMLScript/base64-decode-data.ys
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
!YS-v0
|
||||
|
||||
defn main(str):
|
||||
say: base64-decode(str)
|
||||
Loading…
Add table
Add a link
Reference in a new issue