MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / decrypt

Method decrypt

thirdparty/pydes/pyDes.py:661–680  ·  view source on GitHub ↗

decrypt(data, [pad], [padmode]) -> bytes data : Bytes to be encrypted pad : Optional argument for decryption 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 decrypted with the already specifie

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

Source from the content-addressed store, hash-verified

659 return self.crypt(data, des.ENCRYPT)
660
661 def decrypt(self, data, pad=None, padmode=None):
662 """decrypt(data, [pad], [padmode]) -> bytes
663
664 data : Bytes to be encrypted
665 pad : Optional argument for decryption padding. Must only be one byte
666 padmode : Optional argument for overriding the padding mode.
667
668 The data must be a multiple of 8 bytes and will be decrypted
669 with the already specified key. In PAD_NORMAL mode, if the
670 optional padding character is supplied, then the un-encrypted
671 data will have the padding characters removed from the end of
672 the bytes. This pad removal only occurs on the last 8 bytes of
673 the data (last data block). In PAD_PKCS5 mode, the special
674 padding end markers will be removed from the data after decrypting.
675 """
676 data = self._guardAgainstUnicode(data)
677 if pad is not None:
678 pad = self._guardAgainstUnicode(pad)
679 data = self.crypt(data, des.DECRYPT)
680 return self._unpadData(data, pad, padmode)
681
682
683

Callers

nothing calls this directly

Calls 3

cryptMethod · 0.95
_guardAgainstUnicodeMethod · 0.80
_unpadDataMethod · 0.80

Tested by

no test coverage detected