my computer is about to die!!!
This commit is contained in:
1 parent
d863dc3bd1
commit
e80f2601ab
13 files changed
+244
-11
No files matched your search
@@ -45,3 +45,11 @@ func (this Block) CreateBlock(rd io.Reader) (cipher.Block, []byte, error) {
|
||||
block, err := aes.NewCipher(key)
|
||||
return block, key, err
|
||||
}
|
||||
|
||||
func GetBlockByBlockName(blockName string) (Block, error) {
|
||||
ret := Hash(hashName)
|
||||
if _, err := ret.New(); err != nil {
|
||||
return "", errors.New("block encryption " + blockName + " is not supported")
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
Reference in new issue
Block a user