Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to define key in SubstitutionCryptosystem

if I want to define key=WERGERBNHFDGDVS, how can I replace it

S = SubstitutionCryptosystem(AlphabeticStrings()) K = S.random_key() M = S.encoding("Don't substitute me.") S.deciphering(K, S.enciphering(K, M)) == M True

how to define key in SubstitutionCryptosystem

if I want to define key=WERGERBNHFDGDVS, key=WERGERBNHFDGDVS, how can I replace it

S = SubstitutionCryptosystem(AlphabeticStrings())
K = S.random_key()
M = S.encoding("Don't substitute me.")
S.deciphering(K, S.enciphering(K, M)) == M
True

True