(self, key_data)
| 503 | raise JWEError(e) |
| 504 | |
| 505 | def wrap_key(self, key_data): |
| 506 | key_data = ensure_binary(key_data) |
| 507 | cipher_text = aes_key_wrap(self._key, key_data, default_backend()) |
| 508 | return cipher_text # IV, cipher text, auth tag |
| 509 | |
| 510 | def unwrap_key(self, wrapped_key): |
| 511 | wrapped_key = ensure_binary(wrapped_key) |