MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / encrypt

Method encrypt

thirdparty/pydes/pyDes.py:642–659  ·  view source on GitHub ↗

encrypt(data, [pad], [padmode]) -> bytes data : Bytes to be encrypted pad : Optional argument for encryption padding. Must only be one byte padmode : Optional argument for overriding the padding mode. The data must be a multiple of 8 bytes and will be encrypted with the already specifie

(self, data, pad=None, padmode=None)

Source from the content-addressed store, hash-verified

640 return bytes.fromhex('').join(result)
641
642 def encrypt(self, data, pad=None, padmode=None):
643 """encrypt(data, [pad], [padmode]) -> bytes
644
645 data : Bytes to be encrypted
646 pad : Optional argument for encryption padding. Must only be one byte
647 padmode : Optional argument for overriding the padding mode.
648
649 The data must be a multiple of 8 bytes and will be encrypted
650 with the already specified key. Data does not have to be a
651 multiple of 8 bytes if the padding character is supplied, or
652 the padmode is set to PAD_PKCS5, as bytes will then added to
653 ensure the be padded data is a multiple of 8 bytes.
654 """
655 data = self._guardAgainstUnicode(data)
656 if pad is not None:
657 pad = self._guardAgainstUnicode(pad)
658 data = self._padData(data, pad, padmode)
659 return self.crypt(data, des.ENCRYPT)
660
661 def decrypt(self, data, pad=None, padmode=None):
662 """decrypt(data, [pad], [padmode]) -> bytes

Callers 1

oracle_old_passwdFunction · 0.45

Calls 3

cryptMethod · 0.95
_guardAgainstUnicodeMethod · 0.80
_padDataMethod · 0.80

Tested by

no test coverage detected