# coding: utf-8
# PyGOST -- Pure Python GOST cryptographic functions library
-# Copyright (C) 2015-2018 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2015-2019 Sergey Matveev <stargrave@stargrave.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
self.process_cms(
content_info_raw,
prv_key_raw,
- "GostR3410_2001_CryptoPro_XchA_ParamSet",
+ "id-GostR3410-2001-CryptoPro-XchA-ParamSet",
GOST34112012256,
2001,
)
self.process_cms(
content_info_raw,
prv_key_raw,
- "GostR3410_2012_TC26_ParamSetB",
+ "id-tc26-gost-3410-12-512-paramSetB",
GOST34112012512,
2012,
)
keker,
plaintext_expected,
):
- sbox = "Gost28147_tc26_ParamZ"
+ sbox = "id-tc26-gost-28147-param-Z"
content_info, tail = ContentInfo().decode(content_info_raw, ctx={
"defines_by_path": [
(
self.process_cms(
content_info_raw,
prv_key_our,
- "GostR3410_2001_CryptoPro_XchA_ParamSet",
+ "id-GostR3410-2001-CryptoPro-XchA-ParamSet",
keker,
b"Test data to encrypt.\n" * 100,
)
self.process_cms(
content_info_raw,
prv_key_our,
- "GostR3410_2012_TC26_ParamSetB",
+ "id-tc26-gost-3410-12-512-paramSetB",
keker,
b"Test message",
)
keker,
plaintext_expected,
):
- sbox = "Gost28147_tc26_ParamZ"
+ sbox = "id-tc26-gost-28147-param-Z"
content_info, tail = ContentInfo().decode(content_info_raw, ctx={
"defines_by_path": [
(
self.process_cms(
content_info_raw,
prv_key_our,
- "GostR3410_2001_CryptoPro_XchA_ParamSet",
+ "id-GostR3410-2001-CryptoPro-XchA-ParamSet",
keker,
b"Test message",
)
self.process_cms(
content_info_raw,
prv_key_our,
- "GostR3410_2012_TC26_ParamSetB",
+ "id-tc26-gost-3410-12-512-paramSetB",
keker,
b"Test message",
)