MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / encode_init_vector

Function encode_init_vector

windows/crypto/encrypt_decrypt.py:9–16  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

7__all__ = ["encrypt", "decrypt"]
8
9def encode_init_vector(data):
10 blob = CRYPT_DATA_BLOB.from_string(data)
11 size = DWORD()
12 buf = None
13 winproxy.CryptEncodeObjectEx(DEFAULT_ENCODING, X509_OCTET_STRING, ctypes.byref(blob), 0, None, buf, size)
14 buf = (BYTE * size.value)()
15 winproxy.CryptEncodeObjectEx(DEFAULT_ENCODING, X509_OCTET_STRING, ctypes.byref(blob), 0, None, buf, size)
16 return buf[:]
17
18
19class GenerateInitVector(object):

Callers 1

encryptFunction · 0.85

Calls 1

from_stringMethod · 0.45

Tested by

no test coverage detected