How to use the fcp.node.base64decode function in fcp

To help you get started, we’ve selected a few fcp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github freenet / pyFreenet / babcom.py View on Github external
def require_freemail(identity_with_nickname):
    """
    Return the given identity's Freemail address.
    Abort with an error message if the given identity does not have a
    Freemail address / context.

    :param identity_with_nickname: @
    """
    nickname, identity = _parse_name(identity_with_nickname)
    re_encode = base64.b32encode(fcp.node.base64decode(identity))
    # Remove trailing '=' padding.
    re_encode = re_encode.rstrip('=')
    
    # Freemail addresses are lower case.
    address = nickname + '@' + re_encode  + '.freemail'
    return address.lower()