コード例 #1
0
 public void Decode(byte[] bytes)
 {
     for (int i = 0; i < bytes.Length;)
     {
         var(tag, tagLength) = BerHelpers.DecodeTag(Helpers.ArraySlice(bytes, i, bytes.Length));
         i += tagLength;
         Add(tag);
     }
 }
コード例 #2
0
 public void Decode(byte[] bytes)
 {
     for (int i = 0; i < bytes.Length;)
     {
         var(tag, tagLength) = BerHelpers.DecodeTag(Helpers.ArraySlice(bytes, i, bytes.Length));
         i += tagLength;
         var(length, lengthlength) = BerHelpers.DecodeLength(Helpers.ArraySlice(bytes, i, bytes.Length));
         i        += lengthlength;
         this[tag] = (int)length;
     }
 }