{"id":15533257,"url":"https://github.com/keyweeusr/vial","last_synced_at":"2025-08-25T05:06:13.501Z","repository":{"id":57408435,"uuid":"60898764","full_name":"KeyWeeUsr/Vial","owner":"KeyWeeUsr","description":":v: A simple wrapper for PyCrypto's AES CTR encryption.","archived":false,"fork":false,"pushed_at":"2016-06-11T09:48:27.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T12:45:47.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/aes-vial","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KeyWeeUsr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-11T08:50:36.000Z","updated_at":"2016-06-11T15:13:41.000Z","dependencies_parsed_at":"2022-09-26T17:10:59.268Z","dependency_job_id":null,"html_url":"https://github.com/KeyWeeUsr/Vial","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyWeeUsr%2FVial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyWeeUsr%2FVial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyWeeUsr%2FVial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeyWeeUsr%2FVial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeyWeeUsr","download_url":"https://codeload.github.com/KeyWeeUsr/Vial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239576799,"owners_count":19662113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T11:35:08.629Z","updated_at":"2025-02-19T00:48:54.512Z","avatar_url":"https://github.com/KeyWeeUsr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Vial\n====\n\nVial is a simple wrapper for AES CTR mode. You have to set the key to\nan appropriate length:\n\n    AES-128bit (16 bytes/characters)\n    AES-192bit (24 bytes/characters)\n    AES-256bit (32 bytes/characters)\n\nor use a hashing package that'll provide more security and ease your pain of\ntyping exactly the 16, 24 or 32 characters.\n\n_Usage:_\n\n    import vial\n\n    vial = vial.Vial(key)\n    vial.encrypt(plaintext, output_counter_file)\n    vial.decrypt(plaintext, output_counter_file)\n    vial.encrypt_stream(input, output, block_size)\n    vial.decrypt_stream(input, output, block_size)\n\n##### encrypt(text, counter_path)\nThis function needs as an extra argument a path where you want\nthe file with initial Counter value stored. The file is important,\nyou need to use it to decrypt.\n\n_Returns:_ encrypted text (bytes)\n\n##### decrypt(text, counter_path)\nThis function needs as an extra argument the path where you saved\nthe file from Vial.encrypt(). Without this file the text won't be\ndecrypted.\n\n_Returns:_ decrypted text (bytes)\n\n##### encrypt_stream(input, output, block_size=4096)\nThis function needs as extra arguments only input file and a path\nfor the output file. A file with Counter's initial value will be\ncreated automatically in the same location and with the same name as\noutput file.\n\n_Args:_\n\n    input, output: Expects a file object ( f = open(...) )\n    block_size (optional): The max block_size to encrypt with the same\n                           AES encrypt()\n\n_Example:_\n\n    vial = Vial(key)\n    input = open('encrypt_me.png', 'rb')\n    output = open('im_encrypted.png', 'wb')\n    vial.encrypt_stream(input, output)\n    input.close()\n    output.close()\n\n_Result:_\n\n    root/\n        encrypt_me.png\n        im_encrypted.png\n        im_encrypted.ctr\n\n##### decrypt_stream(input, output, block_size=4096)\nThis function needs as extra arguments only input file and a path\nfor the output file. The file with Counter's initial value has to be\nplaced in the same folder as the input file as the function\nautomatically checks for it and gets the value to decrypt it.\n\n_Args:_\n\n    input, output: Expects a file object ( f = open(...) )\n    block_size (optional): The max block_size to decrypt with the same\n                           AES decrypt()\n\n_Example:_\n\n    vial = Vial(key)\n    input = open('im_encrypted.png', 'rb')\n    output = open('im_decrypted.png', 'wb')\n    vial.encrypt_stream(input, output)\n    input.close()\n    output.close()\n\n_Result:_\n\n    root/\n        im_encrypted.png\n        im_encrypted.ctr\n        im_decrypted.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyweeusr%2Fvial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeyweeusr%2Fvial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeyweeusr%2Fvial/lists"}