From 84d2482ddbff9564c9ad75b2d30af66e3ddfd44d Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 12 May 2016 15:08:58 -0400 Subject: Updating go depencancies. Switching to go1.6 vendoring (#2949) --- vendor/gopkg.in/asn1-ber.v1/content_int.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 vendor/gopkg.in/asn1-ber.v1/content_int.go (limited to 'vendor/gopkg.in/asn1-ber.v1/content_int.go') diff --git a/vendor/gopkg.in/asn1-ber.v1/content_int.go b/vendor/gopkg.in/asn1-ber.v1/content_int.go new file mode 100644 index 000000000..1858b74b6 --- /dev/null +++ b/vendor/gopkg.in/asn1-ber.v1/content_int.go @@ -0,0 +1,25 @@ +package ber + +func encodeUnsignedInteger(i uint64) []byte { + n := uint64Length(i) + out := make([]byte, n) + + var j int + for ; n > 0; n-- { + out[j] = (byte(i >> uint((n-1)*8))) + j++ + } + + return out +} + +func uint64Length(i uint64) (numBytes int) { + numBytes = 1 + + for i > 255 { + numBytes++ + i >>= 8 + } + + return +} -- cgit v1.2.3-1-g7c22