enhance(golang): enhance Encrypt, ComputeMAC and Sign memory allocation
Use make function to allocate the slice with a specific capacity as we already know the size of the slice which is length of primary.Prefix + the length of ct.
Showing
- go/aead/aead_factory.go 1 addition, 1 deletiongo/aead/aead_factory.go
- go/daead/daead_factory.go 1 addition, 1 deletiongo/daead/daead_factory.go
- go/hybrid/hybrid_encrypt_factory.go 1 addition, 1 deletiongo/hybrid/hybrid_encrypt_factory.go
- go/mac/mac_factory.go 1 addition, 1 deletiongo/mac/mac_factory.go
- go/signature/signer_factory.go 1 addition, 1 deletiongo/signature/signer_factory.go
- go/subtle/aead/aes_gcm.go 1 addition, 1 deletiongo/subtle/aead/aes_gcm.go
- go/subtle/aead/chacha20poly1305.go 1 addition, 1 deletiongo/subtle/aead/chacha20poly1305.go
Loading
Please register or sign in to comment