Example #1
0
def cipher_functions(username, password):
    from sysident import sysident

    mach_key = sysident()
    digest = sha1(username + password).digest()
    assert len(mach_key) == len(digest)
    key = strings.string_xor(digest, mach_key)
    return crypto.cipher_functions(key[-16:], mode=crypto.Mode.CBC)
Example #2
0
def cipher_functions(username, password):
    from sysident import sysident

    mach_key = sysident()
    digest = sha1(username + password).digest()
    assert len(mach_key) == len(digest)
    key = strings.string_xor(digest, mach_key)
    return crypto.cipher_functions(key[-16:], mode=crypto.Mode.CBC)
Example #3
0
    def _get_key(self, keymat=''):
        keys = getattr(self, '_keys', None)
        if keys is None:
            keys = self._keys = {}

        key = keys.get(keymat, None)
        if key is not None:
            return key

        self._keys[keymat] = sysident.sysident(append=keymat)

        return self._keys[keymat]
Example #4
0
File: v0.py Project: sgricci/digsby
    def _get_key(self, keymat=''):
        keys = getattr(self, '_keys', None)
        if keys is None:
            keys = self._keys = {}

        key = keys.get(keymat, None)
        if key is not None:
            return key

        self._keys[keymat] = sysident.sysident(append=keymat)

        return self._keys[keymat]