Chris,
I ran into your padding methods which put the remainder size in each empty space after the real data.
I have a problem with
ByteArray>>unpaddedSize
"If I was padded by a BlockCipher, answer the size of the original plaintext."
self isProperlyPadded ifFalse: [ CryptographyError signal: 'Authentication failure (improperly padded!)' ].
^ self size - self last
Since isProperlyPadded assumes that that was some padding the error seems unnecessary.
Shouldn't this say:
ByteArray>>unpaddedSize
"If I was padded by a BlockCipher, answer the size of the original plaintext."
self isProperlyPadded ifFalse: [^self size].
^ self size - self last