• probably. If you can give an example of the unencrypted value / encrypted value as it would be processed from vb.net, we can see if there is a matching algorythm in SQL.

    if it doesn't, it's actually very easy to create a CLR (Common Language Runtime) function for SQL which calles the actual Sub or Function in VB.NET and returns the result, so you can simply re-use the exisitng functionality.

    I had to do exactly that for an AES class we use in VB.NET in one of our applications.;

    if you assume the code below Encrypt() and Decrypt() are calling VB.NET code, here's a n existing snippet of a working example.

    #Region "AES Encrypt Descrypt"

    <Microsoft.SqlServer.Server.SqlFunction()> _

    Public Shared Function CLR_EncryptAES(<SqlFacet(MaxSize:=512)> ByVal TextString As SqlString, <SqlFacet(MaxSize:=512)> ByVal Password As SqlString) As SqlString

    Dim _sResults As SqlString

    _sResults = New SqlString(Encrypt(TextString.ToString, Password.ToString))

    Return _sResults

    End Function

    <Microsoft.SqlServer.Server.SqlFunction()> _

    Public Shared Function CLR_DecryptAES(<SqlFacet(MaxSize:=512)> ByVal EncryptedString As SqlString, <SqlFacet(MaxSize:=512)> ByVal Password As SqlString) As SqlString

    Dim _sResults As SqlString

    _sResults = New SqlString(Decrypt(EncryptedString.ToString, Password.ToString))

    Return _sResults

    End Function

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!