Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cryptography help
#4
The 'str.find()' is going to return a number (integer) starting with 0 For the beginning and ending with usually the length of the string, unless specified otherwise. It will be -1 if not found. You will need to rethink your logic to determine what exactly you want to do with the 'key' (index) as it relates to process.

Also, in your 'decoded' function, don't you want to return 'coded' rather than 'plain'?
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
cryptography help - by jorrdn - Mar-10-2018, 01:09 AM
RE: cryptography help - by Zman350x - Mar-10-2018, 02:18 AM
RE: cryptography help - by Larz60+ - Mar-10-2018, 03:41 AM
RE: cryptography help - by sparkz_alot - Mar-10-2018, 02:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [cryptography.io] How to convert DER signature to ECDSA fstefanov 1 3,072 Jul-04-2019, 08:59 AM
Last Post: fstefanov
  Cryptography in Python NLittle17 6 4,381 Jan-13-2019, 07:11 PM
Last Post: NLittle17
  Python cryptography or pycrypto lexlukkia 4 58,812 Jan-25-2017, 12:08 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020