-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[add] pack & start command support license
- Loading branch information
Showing
7 changed files
with
61 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package pack | ||
|
||
// ******************************************************************************** | ||
// WARNING: DO NOT MODIFY THIS FILE. IT WILL BE REPLACED BY THE APPLICATION CODE. | ||
// ********************************************************************************* | ||
|
||
import ( | ||
"io" | ||
|
||
"github.com/yaoapp/gou/application/yaz/ciphers" | ||
) | ||
|
||
// Pack the yao app package | ||
type Pack struct{ aes ciphers.AES } | ||
|
||
// Cipher the cipher | ||
var Cipher *Pack | ||
|
||
// SetCipher set the cipher | ||
func SetCipher(license string) { | ||
Cipher = &Pack{aes: ciphers.NewAES([]byte(license))} | ||
} | ||
|
||
// Encrypt encrypt | ||
func (pack *Pack) Encrypt(reader io.Reader, writer io.Writer) error { | ||
return pack.aes.Encrypt(reader, writer) | ||
} | ||
|
||
// Decrypt decrypt | ||
func (pack *Pack) Decrypt(reader io.Reader, writer io.Writer) error { | ||
return pack.aes.Decrypt(reader, writer) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters