├── README.md ├── base64decode.cs ├── base64decode.go ├── base64decode.pgsql ├── base64decode.php ├── base64decode.pl ├── base64decode.py ├── base64decode.rb ├── base64decode.sh ├── base64decode.sql └── base64decode.vb /README.md: -------------------------------------------------------------------------------- 1 | # examples 2 | [Base64](http://base64decode.net) decode functions in most popular programming languages 3 | -------------------------------------------------------------------------------- /base64decode.cs: -------------------------------------------------------------------------------- 1 | string base64Encoded = "YmFzZTY0IGVuY29kZWQgc3RyaW5n"; 2 | string base64Decoded; 3 | byte[] data = System.Convert.FromBase64String(base64Encoded); 4 | base64Decoded = System.Text.ASCIIEncoding.ASCII.GetString(data); 5 | Console.WriteLine(base64Decoded) 6 | -------------------------------------------------------------------------------- /base64decode.go: -------------------------------------------------------------------------------- 1 | package main 2 | import b64 "encoding/base64" 3 | import fmt 4 | 5 | func main() { 6 | data := "YmFzZTY0IGVuY29kZWQgc3RyaW5n" 7 | sDec := b64.StdEncoding.DecodeString(data) 8 | fmt.Println(sDec) 9 | } 10 | -------------------------------------------------------------------------------- /base64decode.pgsql: -------------------------------------------------------------------------------- 1 | select decode('YmFzZTY0IGVuY29kZWQgc3RyaW5n', 'base64'); 2 | -------------------------------------------------------------------------------- /base64decode.php: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /base64decode.pl: -------------------------------------------------------------------------------- 1 | use MIME::Base64; 2 | $encoded = 'YmFzZTY0IGVuY29kZWQgc3RyaW5n'; 3 | $decoded = decode_base64($encoded); 4 | print $decoded; 5 | -------------------------------------------------------------------------------- /base64decode.py: -------------------------------------------------------------------------------- 1 | import base64 2 | encoded = 'YmFzZTY0IGVuY29kZWQgc3RyaW5n' 3 | data = base64.b64decode(encoded) 4 | print data 5 | -------------------------------------------------------------------------------- /base64decode.rb: -------------------------------------------------------------------------------- 1 | require "base64" 2 | 3 | encoded_string = 'YmFzZTY0IGVuY29kZWQgc3RyaW5n' 4 | decoded_string = Base64.decode64(encoded_string) 5 | puts decoded_string 6 | -------------------------------------------------------------------------------- /base64decode.sh: -------------------------------------------------------------------------------- 1 | echo bGludXggYmFzZTY0IGRlY29kZQo= | base64 -d 2 | -------------------------------------------------------------------------------- /base64decode.sql: -------------------------------------------------------------------------------- 1 | SELECT FROM_BASE64('YmFzZTY0IGVuY29kZWQgc3RyaW5n'); 2 | -------------------------------------------------------------------------------- /base64decode.vb: -------------------------------------------------------------------------------- 1 | Dim base64Encoded As String = "YmFzZTY0IGVuY29kZWQgc3RyaW5n" 2 | Dim base64Decoded as String 3 | Dim data() As Byte 4 | data = System.Convert.FromBase64String(base64Encoded) 5 | base64Decoded = System.Text.ASCIIEncoding.ASCII.GetString(data) 6 | Console.WriteLine(base64Decoded) 7 | --------------------------------------------------------------------------------