Answers for "decode base64"

23

javascript base64 encode

var string = "Hello folks how are you doing today?";
var encodedString = btoa(string); // Base64 encode the String
var decodedString = atob(encodedString); // Base64 decode the String
Posted by: Guest on July-31-2019
5

linux decode base64 terminal

//Encode
echo  'linuxhint.com' | base64

//Decode
echo 'bGludXhoaW50LmNvbQo=' | base64 --decode
Posted by: Guest on December-07-2020
5

base64 decode in php

base64_decode('base64');
Posted by: Guest on October-04-2020
0

javascript base64 decode

// Define the string
var string = 'Hello World!';

// Encode the String
var encodedString = btoa(string);
console.log(encodedString); // Outputs: "SGVsbG8gV29ybGQh"

// Decode the String
var decodedString = atob(encodedString);
console.log(decodedString); // Outputs: "Hello World!"
Posted by: Guest on November-14-2020
0

JavaScriptSerializer() and convert to base64

class Program
{
    static void Main(string[] args)
    {
        var account = new ExternalAccount() { Name = "Someone" };
        string json = JsonConvert.SerializeObject(account);
        string base64EncodedExternalAccount = Convert.ToBase64String(Encoding.UTF8.GetBytes(json));
        byte[] byteArray = Convert.FromBase64String(base64EncodedExternalAccount);

        string jsonBack = Encoding.UTF8.GetString(byteArray);
        var accountBack = JsonConvert.DeserializeObject<ExternalAccount>(jsonBack);
        Console.WriteLine(accountBack.Name);
        Console.ReadLine();
    }
}

[Serializable]
public class ExternalAccount
{
    public string Name { get; set; }
}
Posted by: Guest on April-27-2020
1

decode base64

import base64, sys; base64.decode(open(sys.argv[1], "rb"), open(sys.argv[2], "wb"))
Posted by: Guest on August-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language