crypto doing dinosaur
Signed-off-by: Jess Frazelle <jess@mesosphere.com>
This commit is contained in:
parent
8f09204450
commit
2c7c69ae8b
2 changed files with 2 additions and 8 deletions
2
Makefile
2
Makefile
|
@ -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 "+ $@"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue