def generate_serial_key(tally_version, customer_name): # Generate a random serial key serial_key = rsa.new_key(512) # Create a hash of the serial key serial_key_hash = hashlib.sha256(serial_key).hexdigest() # Create a digital signature signature = rsa.sign(serial_key_hash.encode(), private_key, 'SHA-256') # Return the serial key and signature return serial_key, signature
Here's a simple Python example demonstrating a hypothetical serial key generator:
# Example usage: tally_version = "Tally 72" customer_name = "Acme Inc." serial_key, signature = generate_serial_key(tally_version, customer_name) is_valid = verify_serial_key(tally_version, serial_key, signature) print(is_valid) # Output: True or False Note that this example is highly simplified and actual implementation details may vary based on specific requirements and security considerations.
def verify_serial_key(tally_version, serial_key, signature): # Verify the digital signature try: rsa.verify(serial_key, signature, public_key, 'SHA-256') return True except rsa.VerificationError: return False
| TAX CALCULATED ON RECEIPT BASIS | ||||||||||
| Financial Year | 2021-2022 | 2020-2021 | 2019-2020 | 2018-2019 | 2017-2018 | 2016-2017 | 2015-2016 | 2014-2015 | 2013-2014 | 2012-2013 |
| Regime | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | ||
| Total income excluding arrears | ||||||||||
| Arrears of salary | ||||||||||
| Total income | ||||||||||
| Tax on total income | ||||||||||
| Less rebate u/s 87A | ||||||||||
| Tax after rebate | ||||||||||
| Education cess | ||||||||||
| Total Tax | ||||||||||
| Total Tax (A) | ||||||||||
| TAX CALCULATED ON ACCRUAL BASIS | ||||||||||
| Financial Year | 2021-2022 | 2020-2021 | 2019-2020 | 2018-2019 | 2017-2018 | 2016-2017 | 2015-2016 | 2014-2015 | 2013-2014 | 2012-2013 |
| Regime | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | ||
| Total income excluding arrears | ||||||||||
| Arrears of salary | ||||||||||
| Total income | ||||||||||
| Tax on total income | ||||||||||
| Less rebate u/s 87A | ||||||||||
| Tax after rebate | ||||||||||
| Education cess | ||||||||||
| Total Tax | ||||||||||
| Total Tax (B) | ||||||||||
| Relief u/s 89(1) ie, Total Tax (A)-Total Tax (B) | ||||||||||