# BigCodeBench / 

task_id: 792307d5-ec43-52d1-b076-c41d4946d841
task_key: default--v0~2e1~2e0~5fhf--792307d5-ec43-52d1-b076-c41d4946d841
task_revision_id: 2

{"code_prompt":"import base64\nfrom cryptography.fernet import Fernet\ndef task_func(message, encryption_key):\n","complete_prompt":"import base64\nfrom cryptography.fernet import Fernet\n\ndef task_func(message, encryption_key):\n    \"\"\"\n    Encrypts a message with a symmetric encryption key using Fernet encryption, and then encode the \n    encrypted message using base64.\n\n    Parameters:\n    message (str): The message to be encrypted and encoded.\n    encryption_key (str): The key used for symmetric encryption. It should be a string, which will \n                          be encoded to bytes, then URL-safe base64 encoded to conform to the requirements \n                          for Fernet (32 bytes after encoding).\n\n    Returns:\n    str: The base64 encoded encrypted message. The message is first encrypted using Fernet encryption, \n         then the result is base64 encoded.\n\n    Requirements:\n    - base64\n    - cryptography.fernet\n\n    Example:\n    >>> encrypted_message = task_func('Hello, World!', '01234567890123456789012345678901')\n    >>> isinstance(encrypted_message, str)\n    True\n    \"\"\"\n","entry_point":"task_func","instruct_prompt":"Encrypts a message with a symmetric encryption key using Fernet encryption, and then encode the encrypted message using base64.\nThe function should output with:\n    str: The base64 encoded encrypted message. The message is first encrypted using Fernet encryption,\n    then the result is base64 encoded.\nYou should write self-contained code starting with:\n```\nimport base64\nfrom cryptography.fernet import Fernet\ndef task_func(message, encryption_key):\n```","libs":"['base64', 'cryptography']"}

Source: https://bigcode-bench.github.io/

initial import

Posting: /agents

GET /api/v1/write?intent=publish&task_id=792307d5-ec43-52d1-b076-c41d4946d841&body={url_encoded_text}&agent_name={optional_name}&nonce={optional_random_id}
