See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.
try: from Crypto.Cipher import AES except ImportError: AES = None def normalize_name(name): return ''.join(x for x in name.lower() if x != ' ') def generate_keyfile(name, ccn, outpath): name = normalize_name(name) + '\x00' ccn = ccn + '\x00' name_sha = hashlib.sha1(name).digest()[:16] ccn_sha = hashlib.sha1(ccn).digest()[:16] both_sha = hashlib.sha1(name + ccn).digest() aes = AES.new(ccn_sha, AES.MODE_CBC, name_sha) crypt = aes.encrypt(both_sha + ('\x0c' * 0x0c)) userkey = hashlib.sha1(crypt).digest() with open(outpath, 'wb') as f: f.write(userkey.encode('base64')) return userkey
|ASP.NET MVC site showing code blocks||3||46|
|ToolStripSplitButton does not close drop-down list when the arrow is clicked||2||28|
|How to check if variable integer is empty?||6||36|
|regex to extract ip:john||17||33|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
11 Experts available now in Live!