MCPcopy Index your code
hub / github.com/89hmdys/toast

github.com/89hmdys/toast @release-1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release release-1.1.1 ↗ · + Follow
118 symbols 245 edges 12 files 20 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

toast(土司)

起因

  • 项目从JAVA迁移到Go后,由于之前JAVA项目AES加密时使用的是默认ECB在Go中不被支持,只能自己动手实现一个,最后越做越多,就把Go AES/DES加密解密都做了个简单的封装,方便日后使用。

进度

目前支持AES/DES加密解密

aes使用

  • cipher包定义了Cipher接口,其中声明了Encrypt和Decrypt两个方法,前者对数据进行加密,后者对数据进行解密。
  • 调用NewAES()会生成一个使用AES加密算法、ECB工作模式、PKCS57填充模式的默认cipher.
  • 使用NewAESWith(mode CipherMode) Cipher方法指定不同的工作模式,来构建cipher.

Extension points exported contracts — how you extend this code

Cipher (Interface)
* 介绍:Cipher提供了统一的接口对数据进行加密/解密操作. 作者:Alex 版本:release-1.1 */ [1 implementers]
cipher/cipher.go
CipherMode (Interface)
* 介绍:CipherMode为不同的工作模式提供了统一的接口来设置填充方式,创建Cipher。 对于流模式,SetPadding是个空方法,不起任何作用。 作者:Alex 版本:release-1.1 */
cipher/mode.go
Padding (Interface)
* 介绍:Padding接口为各种填充方式提供了统一的接口来填充/还原数据。 作者:Alex 版本:release-1.1 */
cipher/padding.go
SignMode (Interface)
(no doc) [1 implementers]
rsa/mode.go
Key (Interface)
(no doc) [1 implementers]
rsa/key.go
Cipher (Interface)
(no doc) [1 implementers]
rsa/cipher.go
Padding (Interface)
(no doc)
rsa/padding.go
CipherMode (Interface)
(no doc)
rsa/mode.go

Core symbols most depended-on inside this repo

Encrypt
called by 14
rsa/cipher.go
Decrypt
called by 14
rsa/cipher.go
BlockSize
called by 7
cipher/ecb.go
Cipher
called by 4
cipher/mode.go
NewStreamCipher
called by 3
cipher/cipher.go
ParsePKCS8Key
called by 3
rsa/key.go
newPadding
called by 3
rsa/padding.go
NewECBMode
called by 2
cipher/mode.go

Shape

Method 49
Function 41
Struct 10
TypeAlias 10
Interface 8

Languages

Go100%

Modules by API surface

cipher/mode.go23 symbols
rsa/mode.go16 symbols
rsa/key.go12 symbols
rsa/cipher.go11 symbols
cipher/cipher.go11 symbols
rsa/padding.go9 symbols
cipher/ecb.go9 symbols
cipher/padding.go8 symbols
crypto/factory.go6 symbols
crypto/des_test.go5 symbols
crypto/aes_test.go5 symbols
crypto/rsa_test.go3 symbols

For agents

$ claude mcp add toast \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact