Versions in this module Expand all Collapse all v0 v0.0.6 Feb 22, 2024 Changes in this version + const AesCtrAlgorithm + const RsaCryptoWrap + type Cipher interface + type CipherData struct + CEKAlgorithm string + EncryptedIV []byte + EncryptedKey []byte + IV []byte + Key []byte + MatDesc string + WrapAlgorithm string + func (cd *CipherData) Clone() CipherData + func (cd *CipherData) GetIV() uint64 + func (cd *CipherData) RandomKeyIv(keyLen int, ivLen int) error + func (cd *CipherData) SeekIV(startPos uint64) + func (cd *CipherData) SetIV(iv uint64) + type ContentCipher interface + Clone func(cd CipherData) (ContentCipher, error) + DecryptContent func(io.Reader) (io.ReadCloser, error) + EncryptContent func(io.Reader) (io.ReadCloser, error) + GetAlignLen func() int + GetCipherData func() *CipherData + GetEncryptedLen func(int64) int64 + type ContentCipherBuilder interface + ContentCipher func() (ContentCipher, error) + ContentCipherEnv func(Envelope) (ContentCipher, error) + GetMatDesc func() string + func CreateAesCtrCipher(cipher MasterCipher) ContentCipherBuilder + type CryptoDecrypter struct + Body io.Reader + Decrypter io.Reader + func (rc *CryptoDecrypter) Close() error + func (rc *CryptoDecrypter) Read(b []byte) (int, error) + type CryptoEncrypter struct + Body io.Reader + Encrypter io.Reader + func (rc *CryptoEncrypter) Close() error + func (rc *CryptoEncrypter) Read(b []byte) (int, error) + type Decrypter interface + Decrypt func(io.Reader) io.Reader + type Encrypter interface + Encrypt func(io.Reader) io.Reader + type Envelope struct + CEKAlg string + CipherKey string + IV string + MatDesc string + UnencryptedContentLen string + UnencryptedMD5 string + WrapAlg string + func (el Envelope) IsValid() bool + func (el Envelope) String() string + type MasterCipher interface + Decrypt func([]byte) ([]byte, error) + Encrypt func([]byte) ([]byte, error) + GetMatDesc func() string + GetWrapAlgorithm func() string + func CreateMasterRsa(matDesc map[string]string, publicKey string, privateKey string) (MasterCipher, error) + type MasterRsaCipher struct + MatDesc string + PrivateKey string + PublicKey string + func (mrc MasterRsaCipher) Decrypt(cryptoData []byte) ([]byte, error) + func (mrc MasterRsaCipher) Encrypt(plainData []byte) ([]byte, error) + func (mrc MasterRsaCipher) GetMatDesc() string + func (mrc MasterRsaCipher) GetWrapAlgorithm() string