SQL CLR stored procedure for encryption?

Anyway, take into accout this: throw new InvalidOperationException(String. Format("Unable to {0}crypt data. See inner exception for more detail.", encryptFlag?

"en" : "de"), ex) which is rather readable. Isn't it? And another thing using blocks can be nested, so no additional indent is required.

Anyway, take into accout this: throw new InvalidOperationException(String. Format("Unable to {0}crypt data. See inner exception for more detail.", encryptFlag?

"en" : "de"), ex); which is rather readable. Isn't it? And another thing - using blocks can be nested, so no additional indent is required.

Yeah, the string. Format thing isn't terribly readable, but I like to avoid appending strings wherever possible. I was going to split it into two lines, but figured why bother just for an exception message.

Its not complex business logic that I'm trying to make readable. Either that or just let the message always say "encrypt". Anyways, I like the trick with omitting the curly braces, I'll give that a try.

– whatispunk Mar 1 at 16:07.

I wound up putting the key into the code. Certainly not the best solution, but it worked. Anyways, I am not using this method anymore.

I am implementing a completely different scenario.

I've created CLR stored procedures for salt generation and encryption to be used by the SSIS package. Problem: In order for the encrypted passwords to be decryptable by the ASP.NET Membership Provider I need to set the MachineKey used by the CLR stored procedures. I have no idea how to do this, or if it's even possible.

I used Reflector to pull out the required encryption code from the System. The problem is SymmetricAlgorithm.Create() creates the default symmetric algorithm with init vectors as defined by the MachineKey. Any help is appreciated.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions