in this function
1 ) static void SetNewCryptoKey (int newKey)
what is the use of newKey ?
2 ) static int Encrypt (int value, int key)
what is the difference between cryptokey and encrypt key
please tell me a quick tutorial i am totally confused
what will happen if i not use SetNewCryptoKey functionns and Encrypt function in my ObscuredInt ?
I am new to Security and totally confused please help me
SetNewCryptoKey ( int newKey )
“Allows to change default crypto key of this type instances. All new instances will use specified key.
All current instances will use previous key unless you call ApplyNewCryptoKey() on them explicitly.”
static int Encrypt ( int value,
int key
)
“Simple symmetric encryption, uses passed crypto key.”
SetNewCryptoKey() allows you to change this default key for this type (ints, in this example). So you can have one key per type.
It looks like the Encrypt functions can use the default key, i.e. in the version of Encrypt where a key is not an argument, it uses the default key. Or, you can specify the key explicitly by passing it to an Encrypt function that requires they key as a second argument. So you use SetNewCryptoKey() to set a new key for each type, (int, bool etc.)
“what is the difference between
cryptokey and encrypt key”
Nothing, it seems.