aboutsummaryrefslogtreecommitdiff
path: root/pem_marshal.go
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2015-02-15 21:04:59 +0100
committerGibheer <gibheer@gmail.com>2015-02-15 21:04:59 +0100
commitf9164f3f99edf4ae8343d6c67b915e788a5624f8 (patch)
treec3a7029eeb1392bcb73d3bbedec837ff46652591 /pem_marshal.go
initial commit for pki
pki is a small library to make building some of the crypto stuff easier in go.
Diffstat (limited to 'pem_marshal.go')
-rw-r--r--pem_marshal.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/pem_marshal.go b/pem_marshal.go
new file mode 100644
index 0000000..c9be63d
--- /dev/null
+++ b/pem_marshal.go
@@ -0,0 +1,15 @@
+package pkilib
+
+import (
+ "io"
+)
+
+type (
+ marshalledPemBlock []byte
+)
+
+// This function writes the marshalled pem block to a writer and returns the
+// number of written bytes and eventual errors.
+func (b marshalledPemBlock) WriteTo(stream io.Writer) (int, error) {
+ return stream.Write(b)
+}