Base64 encoding

    0

    1

    Mahendra Kumar

    intermediatecryptographyencoding•••

    python program to implement base64 encoding using python base64 module

    import base64
    sample_string = "GeeksForGeeks is the best"
    sample_string_bytes = sample_string.encode("ascii")
    base64_bytes = base64.b64encode(sample_string_bytes)
    base64_string = base64_bytes.decode("ascii")
    print(f"Encoded string: {base64_string}")
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.