/external/python/cryptography/tests/hazmat/primitives/ |
D | utils.py | 62 actual_ciphertext = encryptor.update(binascii.unhexlify(plaintext)) 64 assert actual_ciphertext == binascii.unhexlify(ciphertext) 66 actual_plaintext = decryptor.update(binascii.unhexlify(ciphertext)) 68 assert actual_plaintext == binascii.unhexlify(plaintext) 89 cipher_factory(binascii.unhexlify(params["key"])), 90 mode_factory(binascii.unhexlify(params["iv"]), 91 binascii.unhexlify(params["tag"]), 92 len(binascii.unhexlify(params["tag"]))), 96 decryptor.authenticate_additional_data(binascii.unhexlify(aad)) 97 actual_plaintext = decryptor.update(binascii.unhexlify(ciphertext)) [all …]
|
D | test_concatkdf.py | 40 prk = binascii.unhexlify( 44 okm = binascii.unhexlify(b"1c3bc9e7c4547c5191c0d478cccaed55") 46 oinfo = binascii.unhexlify( 56 prk = binascii.unhexlify( 60 okm = binascii.unhexlify(b"1c3bc9e7c4547c5191c0d478cccaed55") 62 oinfo = binascii.unhexlify( 72 prk = binascii.unhexlify( 76 okm = binascii.unhexlify(b"1c3bc9e7c4547c5191c0d478cccaed55") 78 oinfo = binascii.unhexlify( 88 prk = binascii.unhexlify( [all …]
|
D | test_3des.py | 41 lambda keys, **kwargs: algorithms.TripleDES(binascii.unhexlify(keys)), 42 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 54 binascii.unhexlify(key1 + key2 + key3) 56 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 78 lambda keys, **kwargs: algorithms.TripleDES(binascii.unhexlify(keys)), 79 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 91 binascii.unhexlify(key1 + key2 + key3) 93 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 115 lambda keys, **kwargs: algorithms.TripleDES(binascii.unhexlify(keys)), 116 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)), [all …]
|
D | test_aes.py | 40 key = binascii.unhexlify(vector["key"]) 41 tweak = binascii.unhexlify(vector["i"]) 42 pt = binascii.unhexlify(vector["pt"]) 43 ct = binascii.unhexlify(vector["ct"]) 81 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), 82 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 114 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), 147 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), 148 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 180 lambda key, **kwargs: algorithms.AES(binascii.unhexlify(key)), [all …]
|
D | test_ciphers.py | 32 cipher = AES(binascii.unhexlify(key)) 37 AES(binascii.unhexlify(b"0" * 12)) 75 cipher = Camellia(binascii.unhexlify(key)) 80 Camellia(binascii.unhexlify(b"0" * 12)) 94 cipher = TripleDES(binascii.unhexlify(key)) 99 TripleDES(binascii.unhexlify(b"0" * 12)) 111 cipher = Blowfish(binascii.unhexlify(key)) 116 Blowfish(binascii.unhexlify(b"0" * 6)) 128 cipher = CAST5(binascii.unhexlify(key)) 133 CAST5(binascii.unhexlify(b"0" * 34)) [all …]
|
D | test_hkdf.py | 170 ikm = binascii.unhexlify(vector["ikm"]) 172 assert hkdf.derive(ikm) == binascii.unhexlify(vector["okm"]) 185 ikm = bytearray(binascii.unhexlify(vector["ikm"])) 187 assert hkdf.derive(ikm) == binascii.unhexlify(vector["okm"]) 193 prk = binascii.unhexlify( 200 info = binascii.unhexlify(b"f0f1f2f3f4f5f6f7f8f9") 206 prk = bytearray(binascii.unhexlify( 213 info = binascii.unhexlify(b"f0f1f2f3f4f5f6f7f8f9") 219 prk = binascii.unhexlify( 226 info = binascii.unhexlify(b"f0f1f2f3f4f5f6f7f8f9") [all …]
|
D | test_keywrap.py | 38 wrapping_key = binascii.unhexlify(params["k"]) 39 key_to_wrap = binascii.unhexlify(params["p"]) 59 wrapping_key = binascii.unhexlify(params["k"]) 60 wrapped_key = binascii.unhexlify(params["c"]) 137 wrapping_key = binascii.unhexlify(params["k"]) 138 key_to_wrap = binascii.unhexlify(params["p"]) 149 wrapping_key = binascii.unhexlify(params["key"]) 150 key_to_wrap = binascii.unhexlify(params["input"]) 154 assert wrapped_key == binascii.unhexlify(params["output"]) 165 wrapping_key = binascii.unhexlify(params["k"]) [all …]
|
D | test_aead.py | 128 key = binascii.unhexlify(vector["key"]) 129 nonce = binascii.unhexlify(vector["iv"]) 130 aad = binascii.unhexlify(vector["aad"]) 131 tag = binascii.unhexlify(vector["tag"]) 132 pt = binascii.unhexlify(vector["plaintext"]) 133 ct = binascii.unhexlify(vector["ciphertext"]) 152 key = binascii.unhexlify(vector["key"]) 153 nonce = binascii.unhexlify(vector["nonce"]) 157 aad = binascii.unhexlify(vector["ad"]) 158 tag = binascii.unhexlify(vector["tag"]) [all …]
|
D | test_x963kdf.py | 38 key = binascii.unhexlify( 42 derivedkey = binascii.unhexlify(b"443024c3dae66b95e6f5670601558f71") 49 key = bytearray(binascii.unhexlify( 53 derivedkey = binascii.unhexlify(b"443024c3dae66b95e6f5670601558f71") 60 key = binascii.unhexlify( 64 sharedinfo = binascii.unhexlify(b"75eef81aa3041e33b80971203d2c0c52") 66 derivedkey = binascii.unhexlify( 78 key = binascii.unhexlify(
|
D | test_seed.py | 31 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 48 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)) 65 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)) 82 lambda key, **kwargs: algorithms.SEED(binascii.unhexlify((key))), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv))
|
D | test_cast5.py | 31 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 48 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)) 65 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)) 82 lambda key, **kwargs: algorithms.CAST5(binascii.unhexlify((key))), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv))
|
D | test_idea.py | 31 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 48 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)) 65 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)) 82 lambda key, **kwargs: algorithms.IDEA(binascii.unhexlify((key))), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv))
|
D | test_camellia.py | 37 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 54 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 55 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 71 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 72 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 88 lambda key, **kwargs: algorithms.Camellia(binascii.unhexlify(key)), 89 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
|
D | test_blowfish.py | 31 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 48 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 49 lambda iv, **kwargs: modes.CBC(binascii.unhexlify(iv)), 65 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 66 lambda iv, **kwargs: modes.OFB(binascii.unhexlify(iv)), 82 lambda key, **kwargs: algorithms.Blowfish(binascii.unhexlify(key)), 83 lambda iv, **kwargs: modes.CFB(binascii.unhexlify(iv)),
|
D | test_cmac.py | 55 cmac = CMAC(AES(binascii.unhexlify(key)), backend) 56 cmac.update(binascii.unhexlify(message)) 70 cmac = CMAC(AES(binascii.unhexlify(key)), backend) 71 cmac.update(binascii.unhexlify(message)) 72 assert cmac.verify(binascii.unhexlify(output)) is None 90 cmac = CMAC(TripleDES(binascii.unhexlify(key)), backend) 91 cmac.update(binascii.unhexlify(message)) 110 cmac = CMAC(TripleDES(binascii.unhexlify(key)), backend) 111 cmac.update(binascii.unhexlify(message)) 112 assert cmac.verify(binascii.unhexlify(output)) is None [all …]
|
D | test_x25519.py | 55 private = binascii.unhexlify(vector["input_scalar"]) 56 public = binascii.unhexlify(vector["input_u"]) 57 shared_key = binascii.unhexlify(vector["output_u"]) 64 old_private = private = public = binascii.unhexlify( 68 shared_key = binascii.unhexlify( 88 public = binascii.unhexlify( 91 private = binascii.unhexlify( 119 binascii.unhexlify( 123 binascii.unhexlify( 129 binascii.unhexlify( [all …]
|
D | test_x448.py | 54 private = binascii.unhexlify(vector["input_scalar"]) 55 public = binascii.unhexlify(vector["input_u"]) 56 shared_key = binascii.unhexlify(vector["output_u"]) 63 old_private = private = public = binascii.unhexlify( 67 shared_key = binascii.unhexlify( 89 binascii.unhexlify( 93 binascii.unhexlify( 99 binascii.unhexlify( 103 binascii.unhexlify( 233 private_bytes = binascii.unhexlify(
|
/external/python/cryptography/tests/wycheproof/ |
D | test_aes.py | 25 key = binascii.unhexlify(wycheproof.testcase["key"]) 26 iv = binascii.unhexlify(wycheproof.testcase["iv"]) 27 msg = binascii.unhexlify(wycheproof.testcase["msg"]) 28 ct = binascii.unhexlify(wycheproof.testcase["ct"]) 52 key = binascii.unhexlify(wycheproof.testcase["key"]) 53 iv = binascii.unhexlify(wycheproof.testcase["iv"]) 54 aad = binascii.unhexlify(wycheproof.testcase["aad"]) 55 msg = binascii.unhexlify(wycheproof.testcase["msg"]) 56 ct = binascii.unhexlify(wycheproof.testcase["ct"]) 57 tag = binascii.unhexlify(wycheproof.testcase["tag"]) [all …]
|
D | test_rsa.py | 67 binascii.unhexlify(wycheproof.testgroup["keyDer"]), backend 73 binascii.unhexlify(wycheproof.testcase["sig"]), 74 binascii.unhexlify(wycheproof.testcase["msg"]), 81 binascii.unhexlify(wycheproof.testcase["sig"]), 82 binascii.unhexlify(wycheproof.testcase["msg"]), 100 binascii.unhexlify(wycheproof.testgroup["keyDer"]), backend 107 binascii.unhexlify(wycheproof.testcase["sig"]), 108 binascii.unhexlify(wycheproof.testcase["msg"]), 118 binascii.unhexlify(wycheproof.testcase["sig"]), 119 binascii.unhexlify(wycheproof.testcase["msg"]),
|
D | test_chacha20poly1305.py | 25 key = binascii.unhexlify(wycheproof.testcase["key"]) 26 iv = binascii.unhexlify(wycheproof.testcase["iv"]) 27 aad = binascii.unhexlify(wycheproof.testcase["aad"]) 28 msg = binascii.unhexlify(wycheproof.testcase["msg"]) 29 ct = binascii.unhexlify(wycheproof.testcase["ct"]) 30 tag = binascii.unhexlify(wycheproof.testcase["tag"])
|
D | test_keywrap.py | 18 wrapping_key = binascii.unhexlify(wycheproof.testcase["key"]) 19 key_to_wrap = binascii.unhexlify(wycheproof.testcase["msg"]) 20 expected = binascii.unhexlify(wycheproof.testcase["ct"]) 43 wrapping_key = binascii.unhexlify(wycheproof.testcase["key"]) 44 key_to_wrap = binascii.unhexlify(wycheproof.testcase["msg"]) 45 expected = binascii.unhexlify(wycheproof.testcase["ct"])
|
D | test_dsa.py | 29 binascii.unhexlify(wycheproof.testgroup["keyDer"]), backend 39 binascii.unhexlify(wycheproof.testcase["sig"]), 40 binascii.unhexlify(wycheproof.testcase["msg"]), 46 binascii.unhexlify(wycheproof.testcase["sig"]), 47 binascii.unhexlify(wycheproof.testcase["msg"]),
|
D | test_ecdsa.py | 48 binascii.unhexlify(wycheproof.testgroup["keyDer"]), backend 66 binascii.unhexlify(wycheproof.testcase["sig"]), 67 binascii.unhexlify(wycheproof.testcase["msg"]), 73 binascii.unhexlify(wycheproof.testcase["sig"]), 74 binascii.unhexlify(wycheproof.testcase["msg"]),
|
/external/python/cryptography/docs/development/custom-vectors/arc4/ |
D | verify_arc4.go | 14 func unhexlify(s string) []byte { func 81 unhexlify(vector.key), 82 unhexlify(vector.plaintext), 83 unhexlify(vector.ciphertext)) 102 unhexlify(vector.key), 103 unhexlify(vector.plaintext), 104 unhexlify(vector.ciphertext))
|
/external/python/cpython2/Lib/test/ |
D | test_hashlib.py | 19 from binascii import unhexlify 412 (unhexlify('0c60c80f961f0e71f3a9b524af6012062fe037a6'), None), 413 (unhexlify('ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957'), None), 414 (unhexlify('4b007901b765489abead49d926f721d065a429c1'), None), 416 (unhexlify('3d2eec4fe41c849b80c8d83662c0e44a8b291a964c' 418 (unhexlify('56fa6aa75548099dcc37d7f03425e0c3'), None),], 420 (unhexlify('120fb6cffcf8b32c43e7225256c4f837' 422 (unhexlify('ae4d0c95af6b46d32d0adff928f06dd0' 424 (unhexlify('c5e478d59288c841aa530db6845c4c8d' 428 (unhexlify('348c89dbcbd32b2f32d814b8116e84cf2b17' [all …]
|