my computer will still die soon
This commit is contained in:
1 parent
e80f2601ab
commit
52a13b9cab
7 files changed
+62
-6
No files matched your search
@@ -43,3 +43,13 @@ func (this BlockMode) GetCipherStream(block cipher.Block, rd io.Reader) (stream
|
||||
}
|
||||
return streamCreator(block, iv), iv, nil
|
||||
}
|
||||
|
||||
func GetBlockModeByName(blockModeName string) (BlockMode, error) {
|
||||
ret := BlockMode(blockModeName)
|
||||
switch ret {
|
||||
case OFB:
|
||||
return ret, nil
|
||||
default:
|
||||
return "", errors.New("block mode " + blockModeName + " is not supported")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user