예제 #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;
     }
 }