my computer will still die soon

This commit is contained in:
didier.amyot committed 2014-11-01 19:30:24 -07:00
1 parent e80f2601ab
commit 52a13b9cab
7 files changed
+62 -6

No files matched your search

+5 -3
View File
@@ -47,9 +47,11 @@ func (this Block) CreateBlock(rd io.Reader) (cipher.Block, []byte, error) {
}
func GetBlockByBlockName(blockName string) (Block, error) {
ret := Hash(hashName)
if _, err := ret.New(); err != nil {
ret := Block(blockName)
switch ret {
case AES256:
return ret, nil
default:
return "", errors.New("block encryption " + blockName + " is not supported")
}
return ret, nil
}