Beispiel #1
0
        internal byte[][] EncodeUri(Uri uri)
        {
            byte[][] uriTlv = DerEncoder.SegmentedEncodeIA5String(uri.AbsoluteUri.ToCharArray());
            uriTlv[0][0] = (byte)GeneralNameTag.Uri;

            return(uriTlv);
        }
Beispiel #2
0
        internal byte[][] EncodeEmailAddress(string emailAddress)
        {
            byte[][] rfc822NameTlv = DerEncoder.SegmentedEncodeIA5String(emailAddress.ToCharArray());
            rfc822NameTlv[0][0] = (byte)GeneralNameTag.Rfc822Name;

            return(rfc822NameTlv);
        }
Beispiel #3
0
        internal byte[][] EncodeDnsName(string dnsName)
        {
            string idnaName = s_idnMapping.GetAscii(dnsName);

            byte[][] dnsNameTlv = DerEncoder.SegmentedEncodeIA5String(idnaName.ToCharArray());
            dnsNameTlv[0][0] = (byte)GeneralNameTag.DnsName;

            return(dnsNameTlv);
        }