On Monday, July 09, 2001 1:26 AM, G�khan AFACAN wrote:
> While comparing BrandIds, for example, if one of brand1 and brand2 uses
> BMPString and the other does not (as indicated by the DER tag of each) I
> have to convert brand1 and / or brand2 to BMPString. How can I convert
> the two different formats to each other? (PrintableString <> BMPString)
If you have not already done so, you should get a copy of the ISO/ITU
documents related to ASN.1 and DER encoding. (ITU-T Recommendation X.68x
(1994) / ISO/IEC International Standard 8824: 1994 and ITU-T
Recommendation X.690 (1994) / ISO/IEC International Standard 8825: 1994)
If one BrandID is a PrintableString and the other is a BMPString, they do
not match because in certificates, BrandID shall be encoded using
PrintableString if possible.
ASN.1 defines BMPString: "BMPString is a subtype of UniversalString that has
its own unique tag and models the Basic Multilingual Plane (the first 64K-2
cells) of ISO/IEC 10646-1." Since PrintableString is a subset of ASCII, you
can use the ASCII subset of BMPString. For example, the character ":" is
encoded as 0x3A in PrintableString and 0x003A in BMPString.
_________________________________________________________________
Tony Lewis ([EMAIL PROTECTED])
Chief Systems Architect, Application Architecture & Standards
Visa International Service Association