diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2021-03-04 12:53:02 -0500 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2021-03-04 12:53:02 -0500 |
| commit | ae0900bad8bf27b9304099aef25b8038849186cd (patch) | |
| tree | 933c736aaaf2f834befe032a6bf9e03ea311490e /python | |
| parent | 9614b461d14c882eac573706f9a4ac6a343c78da (diff) | |
documentation updates on set_default_session_data and transformation api
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 1 | ||||
| -rw-r--r-- | python/transform.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 8c2ed01f..741c08a7 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1669,6 +1669,7 @@ class BinaryView(object): def set_default_session_data(cls, name, value): """ ``set_default_session_data`` saves a variable to the BinaryView. + :param str name: name of the variable to be saved :param str value: value of the variable to be saved diff --git a/python/transform.py b/python/transform.py index 2f8e58d5..5f064b87 100644 --- a/python/transform.py +++ b/python/transform.py @@ -126,6 +126,14 @@ class Transform(with_metaclass(_TransformMetaClass, object)): >>> rawhex=Transform['RawHex'] >>> rawhex.encode(sha512.encode("test string")) '10e6d647af44624442f388c2c14a787ff8b17e6165b83d767ec047768d8cbcb71a1a3226e7cc7816bc79c0427d94a9da688c41a3992c7bf5e4d7cc3e0be5dbac' + + Note that some transformations take additional parameters (most notably encryption ones that require a 'key' parameter passed via a dict): + + >>> xor=Transform['XOR'] + >>> rawhex=Transform['RawHex'] + >>> xor.encode("Original Data", {'key':'XORKEY'}) + >>> rawhex.encode(xor.encode("Original Data", {'key':'XORKEY'})) + b'173d3b2c2c373923720f242d39' """ transform_type = None name = None |
