From 44fe8fe49169c9aa62022709af196c431d64b84b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Dec 2013 10:10:00 -0800 Subject: [PATCH] Stub out a PGPPacket._key_size dictionary The string-to-key algorithm needs to know the key size, so record an algorithm's key size (in bits) for easy lookup. The AES key sizes seem pretty obvious ;). --- gpg-migrate.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gpg-migrate.py b/gpg-migrate.py index f8c1fd4..d8ae5ac 100755 --- a/gpg-migrate.py +++ b/gpg-migrate.py @@ -123,6 +123,12 @@ class PGPPacket (dict): 'tripledes': _crypto_cipher_des3, } + _key_size = { # in bits + 'aes with 128-bit key': 128, + 'aes with 192-bit key': 192, + 'aes with 256-bit key': 256, + } + _compression_algorithms = { 0: 'uncompressed', 1: 'zip', -- 2.26.2