otdf-python 0.0.4__py3-none-any.whl → 0.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
otdf_python/build.py CHANGED
@@ -149,11 +149,6 @@ mod.add_function('Slice_uint8_elem', retval('uint8_t'), [param('int64_t', 'handl
149
149
  mod.add_function('Slice_uint8_subslice', retval('int64_t'), [param('int64_t', 'handle'), param('int', 'st'), param('int', 'ed')])
150
150
  mod.add_function('Slice_uint8_set', None, [param('int64_t', 'handle'), param('int', 'idx'), param('uint8_t', 'value')])
151
151
  mod.add_function('Slice_uint8_append', None, [param('int64_t', 'handle'), param('uint8_t', 'value')])
152
- mod.add_function('gotdf_python_TokenAuth_CTor', retval('int64_t'), [])
153
- mod.add_function('gotdf_python_TokenAuth_AccessToken_Get', retval('char*'), [param('int64_t', 'handle')])
154
- mod.add_function('gotdf_python_TokenAuth_AccessToken_Set', None, [param('int64_t', 'handle'), param('char*', 'val')])
155
- mod.add_function('gotdf_python_TokenAuth_NpeClientId_Get', retval('char*'), [param('int64_t', 'handle')])
156
- mod.add_function('gotdf_python_TokenAuth_NpeClientId_Set', None, [param('int64_t', 'handle'), param('char*', 'val')])
157
152
  mod.add_function('gotdf_python_DecryptionConfig_CTor', retval('int64_t'), [])
158
153
  mod.add_function('gotdf_python_DecryptionConfig_ClientId_Get', retval('char*'), [param('int64_t', 'handle')])
159
154
  mod.add_function('gotdf_python_DecryptionConfig_ClientId_Set', None, [param('int64_t', 'handle'), param('char*', 'val')])
@@ -178,13 +173,18 @@ mod.add_function('gotdf_python_EncryptionConfig_KasUrl_Get', retval('char*'), [p
178
173
  mod.add_function('gotdf_python_EncryptionConfig_KasUrl_Set', None, [param('int64_t', 'handle'), param('char*', 'val')])
179
174
  mod.add_function('gotdf_python_EncryptionConfig_DataAttributes_Get', retval('int64_t'), [param('int64_t', 'handle')])
180
175
  mod.add_function('gotdf_python_EncryptionConfig_DataAttributes_Set', None, [param('int64_t', 'handle'), param('int64_t', 'val')])
176
+ mod.add_function('gotdf_python_TokenAuth_CTor', retval('int64_t'), [])
177
+ mod.add_function('gotdf_python_TokenAuth_AccessToken_Get', retval('char*'), [param('int64_t', 'handle')])
178
+ mod.add_function('gotdf_python_TokenAuth_AccessToken_Set', None, [param('int64_t', 'handle'), param('char*', 'val')])
179
+ mod.add_function('gotdf_python_TokenAuth_NpeClientId_Get', retval('char*'), [param('int64_t', 'handle')])
180
+ mod.add_function('gotdf_python_TokenAuth_NpeClientId_Set', None, [param('int64_t', 'handle'), param('char*', 'val')])
181
+ add_checked_string_function(mod, 'gotdf_python_EncryptFilePE', retval('char*'), [param('char*', 'inputFilePath'), param('char*', 'outputFilePath'), param('int64_t', 'config'), param('int64_t', 'token')])
182
+ add_checked_string_function(mod, 'gotdf_python_EncryptString', retval('char*'), [param('char*', 'inputText'), param('int64_t', 'config')])
183
+ add_checked_string_function(mod, 'gotdf_python_Hello', retval('char*'), [])
181
184
  add_checked_string_function(mod, 'gotdf_python_DecryptFile', retval('char*'), [param('char*', 'inputFilePath'), param('char*', 'outputFilePath'), param('int64_t', 'config')])
182
185
  add_checked_string_function(mod, 'gotdf_python_DecryptFilePE', retval('char*'), [param('char*', 'inputFilePath'), param('char*', 'outputFilePath'), param('int64_t', 'config'), param('int64_t', 'token')])
183
186
  add_checked_string_function(mod, 'gotdf_python_DecryptStringPE', retval('char*'), [param('char*', 'inputText'), param('int64_t', 'config'), param('int64_t', 'token')])
184
187
  add_checked_string_function(mod, 'gotdf_python_EncryptFile', retval('char*'), [param('char*', 'inputFilePath'), param('char*', 'outputFilePath'), param('int64_t', 'config')])
185
- add_checked_string_function(mod, 'gotdf_python_EncryptFilePE', retval('char*'), [param('char*', 'inputFilePath'), param('char*', 'outputFilePath'), param('int64_t', 'config'), param('int64_t', 'token')])
186
- add_checked_string_function(mod, 'gotdf_python_EncryptString', retval('char*'), [param('char*', 'inputText'), param('int64_t', 'config')])
187
- add_checked_string_function(mod, 'gotdf_python_Hello', retval('char*'), [])
188
188
 
189
189
  mod.generate(open('gotdf_python.c', 'w'))
190
190
 
@@ -44,73 +44,6 @@ os.chdir(cwd)
44
44
 
45
45
  # ---- Structs ---
46
46
 
47
- # Python type for struct gotdf_python.TokenAuth
48
- class TokenAuth(go.GoClass):
49
- """"""
50
- def __init__(self, *args, **kwargs):
51
- """
52
- handle=A Go-side object is always initialized with an explicit handle=arg
53
- otherwise parameters can be unnamed in order of field names or named fields
54
- in which case a new Go object is constructed first
55
- """
56
- if len(kwargs) == 1 and 'handle' in kwargs:
57
- self.handle = kwargs['handle']
58
- _gotdf_python.IncRef(self.handle)
59
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
60
- self.handle = args[0].handle
61
- _gotdf_python.IncRef(self.handle)
62
- else:
63
- self.handle = _gotdf_python.gotdf_python_TokenAuth_CTor()
64
- _gotdf_python.IncRef(self.handle)
65
- if 0 < len(args):
66
- self.AccessToken = args[0]
67
- if "AccessToken" in kwargs:
68
- self.AccessToken = kwargs["AccessToken"]
69
- if 1 < len(args):
70
- self.NpeClientId = args[1]
71
- if "NpeClientId" in kwargs:
72
- self.NpeClientId = kwargs["NpeClientId"]
73
- def __del__(self):
74
- _gotdf_python.DecRef(self.handle)
75
- def __str__(self):
76
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
77
- sv = 'gotdf_python.TokenAuth{'
78
- first = True
79
- for v in pr:
80
- if callable(v[1]):
81
- continue
82
- if first:
83
- first = False
84
- else:
85
- sv += ', '
86
- sv += v[0] + '=' + str(v[1])
87
- return sv + '}'
88
- def __repr__(self):
89
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
90
- sv = 'gotdf_python.TokenAuth ( '
91
- for v in pr:
92
- if not callable(v[1]):
93
- sv += v[0] + '=' + str(v[1]) + ', '
94
- return sv + ')'
95
- @property
96
- def AccessToken(self):
97
- return _gotdf_python.gotdf_python_TokenAuth_AccessToken_Get(self.handle)
98
- @AccessToken.setter
99
- def AccessToken(self, value):
100
- if isinstance(value, go.GoClass):
101
- _gotdf_python.gotdf_python_TokenAuth_AccessToken_Set(self.handle, value.handle)
102
- else:
103
- _gotdf_python.gotdf_python_TokenAuth_AccessToken_Set(self.handle, value)
104
- @property
105
- def NpeClientId(self):
106
- return _gotdf_python.gotdf_python_TokenAuth_NpeClientId_Get(self.handle)
107
- @NpeClientId.setter
108
- def NpeClientId(self, value):
109
- if isinstance(value, go.GoClass):
110
- _gotdf_python.gotdf_python_TokenAuth_NpeClientId_Set(self.handle, value.handle)
111
- else:
112
- _gotdf_python.gotdf_python_TokenAuth_NpeClientId_Set(self.handle, value)
113
-
114
47
  # Python type for struct gotdf_python.DecryptionConfig
115
48
  class DecryptionConfig(go.GoClass):
116
49
  """"""
@@ -336,6 +269,73 @@ class EncryptionConfig(go.GoClass):
336
269
  else:
337
270
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
338
271
 
272
+ # Python type for struct gotdf_python.TokenAuth
273
+ class TokenAuth(go.GoClass):
274
+ """"""
275
+ def __init__(self, *args, **kwargs):
276
+ """
277
+ handle=A Go-side object is always initialized with an explicit handle=arg
278
+ otherwise parameters can be unnamed in order of field names or named fields
279
+ in which case a new Go object is constructed first
280
+ """
281
+ if len(kwargs) == 1 and 'handle' in kwargs:
282
+ self.handle = kwargs['handle']
283
+ _gotdf_python.IncRef(self.handle)
284
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
285
+ self.handle = args[0].handle
286
+ _gotdf_python.IncRef(self.handle)
287
+ else:
288
+ self.handle = _gotdf_python.gotdf_python_TokenAuth_CTor()
289
+ _gotdf_python.IncRef(self.handle)
290
+ if 0 < len(args):
291
+ self.AccessToken = args[0]
292
+ if "AccessToken" in kwargs:
293
+ self.AccessToken = kwargs["AccessToken"]
294
+ if 1 < len(args):
295
+ self.NpeClientId = args[1]
296
+ if "NpeClientId" in kwargs:
297
+ self.NpeClientId = kwargs["NpeClientId"]
298
+ def __del__(self):
299
+ _gotdf_python.DecRef(self.handle)
300
+ def __str__(self):
301
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
302
+ sv = 'gotdf_python.TokenAuth{'
303
+ first = True
304
+ for v in pr:
305
+ if callable(v[1]):
306
+ continue
307
+ if first:
308
+ first = False
309
+ else:
310
+ sv += ', '
311
+ sv += v[0] + '=' + str(v[1])
312
+ return sv + '}'
313
+ def __repr__(self):
314
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
315
+ sv = 'gotdf_python.TokenAuth ( '
316
+ for v in pr:
317
+ if not callable(v[1]):
318
+ sv += v[0] + '=' + str(v[1]) + ', '
319
+ return sv + ')'
320
+ @property
321
+ def AccessToken(self):
322
+ return _gotdf_python.gotdf_python_TokenAuth_AccessToken_Get(self.handle)
323
+ @AccessToken.setter
324
+ def AccessToken(self, value):
325
+ if isinstance(value, go.GoClass):
326
+ _gotdf_python.gotdf_python_TokenAuth_AccessToken_Set(self.handle, value.handle)
327
+ else:
328
+ _gotdf_python.gotdf_python_TokenAuth_AccessToken_Set(self.handle, value)
329
+ @property
330
+ def NpeClientId(self):
331
+ return _gotdf_python.gotdf_python_TokenAuth_NpeClientId_Get(self.handle)
332
+ @NpeClientId.setter
333
+ def NpeClientId(self, value):
334
+ if isinstance(value, go.GoClass):
335
+ _gotdf_python.gotdf_python_TokenAuth_NpeClientId_Set(self.handle, value.handle)
336
+ else:
337
+ _gotdf_python.gotdf_python_TokenAuth_NpeClientId_Set(self.handle, value)
338
+
339
339
 
340
340
  # ---- Slices ---
341
341
 
@@ -347,18 +347,6 @@ class EncryptionConfig(go.GoClass):
347
347
 
348
348
 
349
349
  # ---- Functions ---
350
- def DecryptFile(inputFilePath, outputFilePath, config):
351
- """DecryptFile(str inputFilePath, str outputFilePath, object config) str, str"""
352
- return _gotdf_python.gotdf_python_DecryptFile(inputFilePath, outputFilePath, config.handle)
353
- def DecryptFilePE(inputFilePath, outputFilePath, config, token):
354
- """DecryptFilePE(str inputFilePath, str outputFilePath, object config, object token) str, str"""
355
- return _gotdf_python.gotdf_python_DecryptFilePE(inputFilePath, outputFilePath, config.handle, token.handle)
356
- def DecryptStringPE(inputText, config, token):
357
- """DecryptStringPE(str inputText, object config, object token) str, str"""
358
- return _gotdf_python.gotdf_python_DecryptStringPE(inputText, config.handle, token.handle)
359
- def EncryptFile(inputFilePath, outputFilePath, config):
360
- """EncryptFile(str inputFilePath, str outputFilePath, object config) str, str"""
361
- return _gotdf_python.gotdf_python_EncryptFile(inputFilePath, outputFilePath, config.handle)
362
350
  def EncryptFilePE(inputFilePath, outputFilePath, config, token):
363
351
  """EncryptFilePE(str inputFilePath, str outputFilePath, object config, object token) str, str
364
352
 
@@ -379,5 +367,17 @@ def Hello():
379
367
  conventional & useful function like GetVersion()
380
368
  """
381
369
  return _gotdf_python.gotdf_python_Hello()
370
+ def DecryptFile(inputFilePath, outputFilePath, config):
371
+ """DecryptFile(str inputFilePath, str outputFilePath, object config) str, str"""
372
+ return _gotdf_python.gotdf_python_DecryptFile(inputFilePath, outputFilePath, config.handle)
373
+ def DecryptFilePE(inputFilePath, outputFilePath, config, token):
374
+ """DecryptFilePE(str inputFilePath, str outputFilePath, object config, object token) str, str"""
375
+ return _gotdf_python.gotdf_python_DecryptFilePE(inputFilePath, outputFilePath, config.handle, token.handle)
376
+ def DecryptStringPE(inputText, config, token):
377
+ """DecryptStringPE(str inputText, object config, object token) str, str"""
378
+ return _gotdf_python.gotdf_python_DecryptStringPE(inputText, config.handle, token.handle)
379
+ def EncryptFile(inputFilePath, outputFilePath, config):
380
+ """EncryptFile(str inputFilePath, str outputFilePath, object config) str, str"""
381
+ return _gotdf_python.gotdf_python_EncryptFile(inputFilePath, outputFilePath, config.handle)
382
382
 
383
383
 
@@ -1,7 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: otdf_python
3
- Version: 0.0.4
3
+ Version: 0.0.7
4
4
  Home-page: https://github.com/b-long/opentdf-python-sdk
5
+ Author-email: b-long@users.noreply.github.com
5
6
  Description-Content-Type: text/markdown
6
7
  License-File: LICENSE
7
8
 
@@ -0,0 +1,10 @@
1
+ otdf_python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ otdf_python/_gotdf_python.cpython-311-darwin.so,sha256=a4F1SxI9-UO0pfZIedxd9FTIURVIAJnSfySLgN1a7NE,14765632
3
+ otdf_python/build.py,sha256=rpzmayPVJb1lVmp3z7QsYE_53d1oK9jSzUbGRkyQFEg,16756
4
+ otdf_python/go.py,sha256=7kz0kwEbEJZp9ZJIvdcUryZmhahLRb5RrkhGBN2BDBY,49317
5
+ otdf_python/gotdf_python.py,sha256=anadpyvCfU3Q3tcKHJrQ9Jnx3rkXA6wSmYrfG0CeE0Q,13880
6
+ otdf_python-0.0.7.dist-info/LICENSE,sha256=51wzGxR-Rns8XaiGmDLq2OqPN3qWMpoQKV-fERpVzyM,1063
7
+ otdf_python-0.0.7.dist-info/METADATA,sha256=coi5HnzvUZPVigDX_8ikXJCpQGo6oqtT8f9V-e8zkfM,415
8
+ otdf_python-0.0.7.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
9
+ otdf_python-0.0.7.dist-info/top_level.txt,sha256=A2vK95iTIxdu4pm8kDZlvHorBKCvSN5dvlMdFbIVXrA,12
10
+ otdf_python-0.0.7.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- otdf_python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- otdf_python/_gotdf_python.cpython-311-darwin.so,sha256=skpt12w1l5WxI8FgcBSK950r-whK73Ne0k5bV6Sv4CY,14621432
3
- otdf_python/build.py,sha256=n992UQdwhJukysD1zgty1LrOnNTPEGAAG9MOWGlaJqs,16756
4
- otdf_python/go.py,sha256=7kz0kwEbEJZp9ZJIvdcUryZmhahLRb5RrkhGBN2BDBY,49317
5
- otdf_python/gotdf_python.py,sha256=1-Agpw4XFW01MudVbpiuf59ZRKSzvARXv-ojOlbeKsE,13880
6
- otdf_python-0.0.4.dist-info/LICENSE,sha256=51wzGxR-Rns8XaiGmDLq2OqPN3qWMpoQKV-fERpVzyM,1063
7
- otdf_python-0.0.4.dist-info/METADATA,sha256=51VS1FDVGOGRTSkA6OB3OusYjOdnJj57VmMKiURAQvQ,369
8
- otdf_python-0.0.4.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
9
- otdf_python-0.0.4.dist-info/top_level.txt,sha256=A2vK95iTIxdu4pm8kDZlvHorBKCvSN5dvlMdFbIVXrA,12
10
- otdf_python-0.0.4.dist-info/RECORD,,