> I've got a Guid 36 positions long.  I need a way to encrypt
> this and decript this value.  When I encrypt the value the
> length can be no longer than 30 positions.  Is there a way to
> encrypt the Guid into a length of 30 and decript is back to a
> length of 36, without losing the original value of the Guid?

        A guid is always 16 bytes. So you could grab the 16 bytes and encrypt 
those.
        I think what you're working with is an ASCII representation of those 
bytes, in HEX. When databases don't support a varbinary
type of guid type to store the 16 bytes in, you're doomed to use the ascii 
representation.

        WHat's odd is that 16bytes in hex is always 32characters tops. So it's 
beyond me why they reserved 30 positions, not 32. 30
positions for a guid is absurd and not enough to store the value.

                FB

------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------

>
>
>
> I'm using a third party software and the field I want to
> store this in is only 30 positions long.
>
>
>
> Thanks for the help.
>
> Shawn Hevel, API, AIT
> Lead Programmer Analyst
> Information Technology Department
> South Carolina Farm Bureau Insurance Companies
> Phone: (803) 936-4331
> Fax: (803) 936-4629
> Work Email: [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> Home Email: [EMAIL PROTECTED]
>
>
>
>
> ===================================
> This list is hosted by DevelopMentorR  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to