diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-08-11 15:13:49 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-08-11 15:13:49 +0200 |
commit | dbf201b61a9f3d9e55d6744009f0f8f35c204e9d (patch) | |
tree | b9b97e5548e546051ce0db22edd95511251b7af9 /ber/class.go | |
parent | 2b4528f54bd8893213839f8c57dcfd9a0ce30cef (diff) |
Draft
Diffstat (limited to 'ber/class.go')
-rw-r--r-- | ber/class.go | 7 |
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 +} |