本文介绍了这是一个简单的但稍微有效方式至"模糊处理"数值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说我有一个Access数据库表中,有2列:一是ID(从1到20000,按顺序每个都是独一无二的),一个是值(任何数字从0到500)

Let's say I have an Access database table that has 2 columns: one is ID (from 1 to 20000, sequentially and each is unique) and one is Value (any number from 0 to 500).

我如何混淆在 简单但有些有效的方式值字段(使用ID或不使用ID)?我预计,decoing需要多行的code的东西稍微比ROT13混淆更有效,但没那么复杂。解码是用C#code完成。混淆是通过计算领域的访问完成的。

How do I obfuscate the Value field (using ID or not using ID) in a simple but somewhat effective way? I expect something slightly more effective than ROT13 obfuscation but not so complicated that decoing needs more than one line of code. The decoding is done in C# code. The obfuscation is done via calculated field in Access.

我改变了加密,以混淆,以反映这并不是prevent攻击,但只是为了避免数据的不小心暴露了目标的简单性。

I changed the "encryption" to "obfuscation" to reflect the simplicity of the goal which is NOT to prevent "attack" but only to avoid careless exposure of data.

推荐答案

什么是你的目标/攻击者的个人资料?如果你的需求是什么,更不是停止随意观看你IMPOSIBLE要求...如果你只关心制止随意观看(这是更好地称为模糊处理比加密),你可以尝试像

what is your goal/attacker profile? If your requirement is anything more than stopping casual viewing you have imposible requirements... if you only care about stopping casual viewing (which is better termed obfuscation than encryption) you could try something like

B = A%7 == 0? ((A / 7)* 991):%2 == 0? ((A / 2)* 787):A * 317

和在另一端

B = A%991 == 0? ((A / 991)* 7):一%787 == 0? ((A / 787)* 2):A / 317

请注意,这是非常弱的,但是你的要求不包括加密的任何有用的形式。

Note that this is very weak but your requirements exclude any useful form of encryption.

这篇关于这是一个简单的但稍微有效方式至"模糊处理"数值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 01:53