Skip to main content

Data secured by the Windows API

Project description

Win32Security

Data secured by the Windows API

Author:

License:

  • GNU General Public License v3.0

Version:

  • 2.1.0

Summary


Links


Methods

Execution: python -m Win32Security {path}

  • import Win32Security

    • class SecurityObject

      • SecurityObject(data_=None, encrypt=False)
        • data_ (str): The encrypted or decrypted data to be saved.
        • encrypt (bool): Should the data be encrypted?
      • data (str)
        • The decrypted data
      • encrypted_data (str)
        • The encrypted data

    To use Win32Security you must create a python file which will be your parameter file. This should look like this:

      from Win32Security import *
    
      # <lock:True>
    
    
      def _get_data(data):
          if data[0] == SecurityObject:
            return data[0](data[1]).data
          else:
            return data[0](data[1])
      
          
      class YourClassName__:
          """Settings of YourClassName"""
          
          _YOURVARIABLENAME = (type_of_variable, "Your variable")
          
          @property
          def YOURVARIABLENAME(self):
              return _get_data(self._YOURVARIABLENAME)
      
      
      class ClassExample__:
          """Settings of ClassExample"""
          
          _DATA1 = (SecurityObject, "0a1b2c3d4e5f6g7h8i9j")  # Fake encrypted 'Banana'
          _DATA2 = (int, "42")
          _DATA3 = (str, "foo")
          
          @property
          def DATA3(self):
              return _get_data(self._DATA3)
          
          @property
          def DATA2(self):
              return _get_data(self._DATA2)
          
          @property
          def DATA1(self):
              return _get_data(self._DATA1)
      
      ...
    

    You can call its classes from your code normally, the value of their self will be the value of your variable transformed by the indicated class. If you use the SecurityObject class then the encrypted value in your file will be decrypted when used without modifying the current file.

      obj = ClassExample__().DATA1
      # obj -> 'Banana'
      obj = ClassExample__().DATA2
      # obj -> 42
      obj = ClassExample__().DATA3
      # obj -> 'foo'
    

    In order to create, modify or see your data it is advisable to refer to python -m Win32Security

    To share the file to another computer you can unlock the file.

    /!\ Warning! By unlocking the file all values so far encrypted will be decrypted! A decrypted file is mentioned by the comment at the beginning of the file

       # <lock:False>
    

    Please do not change this value manually as this may corrupt your file!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

win32security-2.1.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

win32security-2.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file win32security-2.1.0.tar.gz.

File metadata

  • Download URL: win32security-2.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for win32security-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3737a721f587ba084bbe24f6babe180cf2498464dc452aa4d41f6077aef186c2
MD5 fe907545fccf864579a95afd1170aa9d
BLAKE2b-256 9f371abcadb3cc78e39e39dc346f3fbdadd4cc3adfbe07b89e545f5ffca52f56

See more details on using hashes here.

File details

Details for the file win32security-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for win32security-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8d734e9b8b452e813718580ec97615ef4d2277154f8c3474dc11b68b97a6645
MD5 0201901d6c0d2b798ec1b062aa8cd60a
BLAKE2b-256 56c6c0f9b6cdccdf2b1580e1547133236cbe5f12eef834742f0805689705765c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page