String.concat#

usencrypt.cipher.String.concat(self, other)#

Concatenates the encrypted string \(E(x)\) with either another encrypted character, another encrypted string, or any non-encrypted string.

Parameters

other (usencrypt.cipher.Char, usencrypt.cipher.String, or str) – The other character or string to be concatenated.

Returns

The resulting concatenated encrypted string.

Return type

usencrypt.cipher.String

Note

This function returns a new encrypted string, and therefore the instance of self remains unchanged.

Examples
>>> import usencrypt as ue
>>> ue_string = ue.encrypt('abc')
>>> ue_char = ue.encrypt('d')
>>> result = ue_string.concat(ue_char)
>>> result
(0x7fe5785173d0) String: 0x0d24c4c1cddcd30bcc72f3269f9b477564b7c0e9e8bde9bc9ab056ebc3b6d0a50x30717b52f463f4f38594a7a70d55fa30f525b14f4de88629847e6d1c755d21030x894aa3347258b77c2c2c637806b92ec6efbbd6ed6d93bb1cbcd0b45e160483d70x4922501209a5407acd75be24ae0c5c9f7fd9ba75de726c040a075a073d95e1ee
>>> ue.decrypt(result)
'abcd'