Philippe de Rochambeau on Mon, 15 Nov 2021 13:28:46 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Cycle structure


Hello,
I’m trying to implement the Caesar Cypher Algorithm in PariBP (cf. https://cryptol.net/files/ProgrammingCryptol.pdf, p. 31).
I have created a variable called «  alphabet »  which contains uppercase characters from A to Z:

alphabet = Vecsmall("ABCDEFGHIJKLMNOPQRSTUVWXYZ »)

If I shift the characters in the vector by, say 3 characters, I get the following string: «  DEF… __ », which contains several blank spaces at the end.

Is there a way to convert a Vecsmall into a cycle structure, in PariGP, so that alphabet[26] = «  A » , ...?

Many thanks.

Cheers,

Philippe