1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/logging.h"
6 #include "net/der/tag.h"
12 Tag
ContextSpecificConstructed(uint8_t base
) {
13 DCHECK_EQ(base
, base
& kTagNumberMask
);
14 return (base
& kTagNumberMask
) | kTagConstructed
| kTagContextSpecific
;
17 Tag
ContextSpecificPrimitive(uint8_t base
) {
18 DCHECK_EQ(base
, base
& kTagNumberMask
);
19 return (base
& kTagNumberMask
) | kTagPrimitive
| kTagContextSpecific
;
22 bool IsConstructed(Tag tag
) {
23 return (tag
& kTagConstructionMask
) == kTagConstructed
;