初次提交
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
package aes
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
)
|
||||
|
||||
func AesCfbNewEncrypSteam() cipher.Stream {
|
||||
block, _ := aes.NewCipher(Key)
|
||||
iv := bytes.Repeat([]byte("1"), block.BlockSize())
|
||||
|
||||
return cipher.NewCFBEncrypter(block, iv)
|
||||
}
|
||||
func AesCfbNewDecrypSteam() cipher.Stream {
|
||||
block, _ := aes.NewCipher(Key)
|
||||
iv := bytes.Repeat([]byte("1"), block.BlockSize())
|
||||
|
||||
return cipher.NewCFBDecrypter(block, iv)
|
||||
}
|
||||
Reference in New Issue
Block a user