How to use the pyglossary.plugin_lib.ripemd128.ripemd128 function in pyglossary

To help you get started, we’ve selected a few pyglossary examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ilius / pyglossary / pyglossary / plugin_lib / readmdict.py View on Github external
def _decrypt_regcode_by_deviceid(reg_code, deviceid):
	deviceid_digest = ripemd128(deviceid)
	s20 = Salsa20(key=deviceid_digest, IV=b"\x00"*8, rounds=8)
	encrypt_key = s20.encryptBytes(reg_code)
	return encrypt_key
github ilius / pyglossary / pyglossary / plugin_lib / readmdict.py View on Github external
def _mdx_decrypt(comp_block):
	key = ripemd128(comp_block[4:8] + pack(b'
github ilius / pyglossary / pyglossary / plugin_lib / readmdict.py View on Github external
def _decrypt_regcode_by_email(reg_code, email):
	email_digest = ripemd128(email.decode().encode('utf-16-le'))
	s20 = Salsa20(key=email_digest, IV=b"\x00"*8, rounds=8)
	encrypt_key = s20.encryptBytes(reg_code)
	return encrypt_key