提交 22036774 编写于 作者: T terrymanu

Update EncryptSpringNamespaceTest

上级 527453b2
......@@ -81,18 +81,16 @@ public final class EncryptSpringNamespaceTest extends AbstractJUnit4SpringContex
}
private void assertEncryptColumn1(final EncryptColumnRuleConfiguration columnRuleConfig) {
assertThat(columnRuleConfig.getLogicColumn(), is("user_id"));
assertThat(columnRuleConfig.getCipherColumn(), is("user_encrypt"));
assertThat(columnRuleConfig.getAssistedQueryColumn(), is("user_assisted"));
assertThat(columnRuleConfig.getPlainColumn(), is("user_decrypt"));
assertThat(columnRuleConfig.getLogicColumn(), is("pwd"));
assertThat(columnRuleConfig.getCipherColumn(), is("pwd_cipher"));
assertThat(columnRuleConfig.getEncryptorName(), is("aesEncryptor"));
}
private void assertEncryptColumn2(final EncryptColumnRuleConfiguration columnRuleConfig) {
assertThat(columnRuleConfig.getLogicColumn(), is("order_id"));
assertThat(columnRuleConfig.getCipherColumn(), is("order_encrypt"));
assertThat(columnRuleConfig.getAssistedQueryColumn(), is("order_assisted"));
assertThat(columnRuleConfig.getPlainColumn(), is("order_decrypt"));
assertThat(columnRuleConfig.getLogicColumn(), is("credit_card"));
assertThat(columnRuleConfig.getCipherColumn(), is("credit_card_cipher"));
assertThat(columnRuleConfig.getAssistedQueryColumn(), is("credit_card_assisted_query"));
assertThat(columnRuleConfig.getPlainColumn(), is("credit_card_plain"));
assertThat(columnRuleConfig.getEncryptorName(), is("md5Encryptor"));
}
}
......@@ -38,8 +38,8 @@
<encrypt:rule id="encryptRule">
<encrypt:table name="t_order">
<encrypt:column logic-column="user_id" cipher-column="user_encrypt" assisted-query-column="user_assisted" plain-column="user_decrypt" encrypt-algorithm-ref="aesEncryptor" />
<encrypt:column logic-column="order_id" cipher-column="order_encrypt" assisted-query-column="order_assisted" plain-column="order_decrypt" encrypt-algorithm-ref="md5Encryptor" />
<encrypt:column logic-column="pwd" cipher-column="pwd_cipher" encrypt-algorithm-ref="aesEncryptor" />
<encrypt:column logic-column="credit_card" cipher-column="credit_card_cipher" assisted-query-column="credit_card_assisted_query" plain-column="credit_card_plain" encrypt-algorithm-ref="md5Encryptor" />
</encrypt:table>
</encrypt:rule>
</beans>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册