crypto doing dinosaur

Signed-off-by: Jess Frazelle <jess@mesosphere.com>
This commit is contained in:
Jess Frazelle 2016-04-18 10:03:50 -07:00
parent 8f09204450
commit 2c7c69ae8b
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
2 changed files with 2 additions and 8 deletions

View file

@ -48,7 +48,7 @@ image.tar:
docker export $(shell docker create $(DOCKER_ROOTFS_IMAGE) sh) > $@ docker export $(shell docker create $(DOCKER_ROOTFS_IMAGE) sh) > $@
rootfs.go: image.tar rootfs.go: image.tar
GOMAXPROCS=1 go run generate.go GOMAXPROCS=1 go generate
fmt: fmt:
@echo "+ $@" @echo "+ $@"

View file

@ -1,3 +1,4 @@
// Package cryptar implements the crypto doing dinosaur.
package cryptar package cryptar
import ( import (
@ -51,13 +52,6 @@ func Decrypt(enctar string, key []byte) ([]byte, error) {
} }
func keyToGCM(key []byte) (cipher.AEAD, error) { func keyToGCM(key []byte) (cipher.AEAD, error) {
/*hash := sha256.New()
if _, err := hash.Write([]byte(key)); err != nil {
return nil, err
}
md := hash.Sum(nil)
mdkey := hex.EncodeToString(md)*/
// encrypt the tar with the key // encrypt the tar with the key
block, err := aes.NewCipher(key) block, err := aes.NewCipher(key)
if err != nil { if err != nil {