Hi Jonathan,

Great! So this issue is not only applicable to me, I think this means it is 
time for a PR.

Jonathan, when you ran more test on Monday, you can see if the following 
can fix this bug:

Overlay the BaseBinaryCipherExecutor class, and change the encode and decode to 
the following:

@Override
@SneakyThrows
public byte[] encode(final byte[] value, final Object[] parameters) { cipher 
= Cipher.getInstance("AES");
cipher.init(Cipher.ENCRYPT_MODE, this.encryptionKey);
final byte[] result = cipher.doFinal(value);
return sign(result);
}
@Override
@SneakyThrows
public byte[] decode(final byte[] value, final Object[] parameters) { cipher 
= Cipher.getInstance("AES");
final byte[] verifiedValue = verifySignature(value);
cipher.init(Cipher.DECRYPT_MODE, this.encryptionKey);
final byte[] bytePlainText = cipher.doFinal(verifiedValue);
return bytePlainText;
}
*Note: If you have trouble doing the above, this tutorial should 
help: https://apereo.github.io/2018/04/01/cas-overlays-supercharged/*

If you problem is the same as mine, the BadPaddingException Exception 
should goes away after the fix.

Cheers!
- Andy



-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/758c161e-266a-45ec-8fe7-18fa76546767%40apereo.org.

Reply via email to