在ShardingSphere中,如何定制加密算法以实现“EncryptAlgorithm”和“QueryAssistedEncryptAlgorithm”类的批量加密。目前,“EncryptAlgorithm”和“QueryAssistedEncryptAlgorithm”都只提供以下方法:
public String encrypt(Object o)
public Object decrypt(String s) 现在,我希望将接口重构为重构浴缸加密,类似于:
public String encrypt(List<String> encryptList)
public Object decrypt(List<String> decryptList) 发布于 2022-10-27 06:24:28
看上去很有趣。我能知道你为什么要扩展这个接口吗?
据我所知,ShardingSphere为每个列值调用这个接口,将其作为一个单元加密和解密,例如,tel = 123,因为ShardingSphere将解析您的ShardingSphere,将Where condition拆分成许多这样的单元,这些单元将由该接口迭代处理。
所以,对不起,我不知道为什么您想要一个参数List<String> decryptList。谢谢。
https://stackoverflow.com/questions/74173099
复制相似问题