diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2016-01-22 17:45:18 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2016-01-24 16:33:36 +0100 |
commit | b6eab4723392e398a459f99ccecc9749c857f0c6 (patch) | |
tree | a37f50e52b4bb36aed709a8ca89ebe27d1bfae81 /tests/test_encryption.doctest | |
parent | b5f7de5a932d1de36b58cef56ece39eae1520d97 (diff) |
Add encryption algorithm property
Either determine the encryption algorithm from the PSKC file or from the
explicitly set value. This also adds support for setting the encryption
key name.
Diffstat (limited to 'tests/test_encryption.doctest')
-rw-r--r-- | tests/test_encryption.doctest | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_encryption.doctest b/tests/test_encryption.doctest index 928d2d3..cd549c3 100644 --- a/tests/test_encryption.doctest +++ b/tests/test_encryption.doctest @@ -1,6 +1,6 @@ test_encryption.doctest - test various encryption schemes -Copyright (C) 2014-2015 Arthur de Jong +Copyright (C) 2014-2016 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -30,6 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA >>> pskc = PSKC('tests/aes128-cbc.pskcxml') >>> pskc.encryption.key = a2b_hex('12345678901234567890123456789012') +>>> pskc.encryption.algorithm +'http://www.w3.org/2001/04/xmlenc#aes128-cbc' >>> tostr(pskc.keys[0].secret) '12345678901234567890' >>> pskc.mac.algorithm @@ -55,6 +57,8 @@ DecryptionError: Invalid key length >>> pskc = PSKC('tests/aes256-cbc.pskcxml') >>> pskc.encryption.key = a2b_hex('1234567890123456789012345678901234567890123456789012345678901234') +>>> pskc.encryption.algorithm +'http://www.w3.org/2001/04/xmlenc#aes256-cbc' >>> tostr(pskc.keys[0].secret) '12345678901234567890' >>> pskc.mac.algorithm |