aboutsummaryrefslogtreecommitdiff
path: root/ber/class.go
diff options
context:
space:
mode:
Diffstat (limited to 'ber/class.go')
-rw-r--r--ber/class.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/ber/class.go b/ber/class.go
index 23d31cd..279b3db 100644
--- a/ber/class.go
+++ b/ber/class.go
@@ -136,3 +136,10 @@ func Private(b []byte) (int, bool) {
c, _, t, _ := Ident(b)
return int(t), c == classPrivate
}
+
+func MarshalClass(c Class, k Kind, t Tag) []byte {
+ tag := base128(int(t))
+ tag[0] |= byte(c)
+ tag[0] |= byte(k)
+ return tag
+}