Skip to content

Commit

Permalink
Fix writers
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Sep 30, 2020
1 parent a9297ed commit c071069
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shadowaead/packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func Pack(dst, plaintext []byte, ciph Cipher) ([]byte, error) {
if err != nil {
return nil, err
}
internal.AddSalt(salt)
internal.GetSaltFilterSingleton().Add(salt)

if len(dst) < saltSize+len(plaintext)+aead.Overhead() {
return nil, io.ErrShortBuffer
Expand Down
2 changes: 1 addition & 1 deletion shadowaead/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func (c *streamConn) initWriter() error {
if err != nil {
return err
}
internal.AddSalt(salt)
internal.GetSaltFilterSingleton().Add(salt)
c.w = newWriter(c.Conn, aead)
return nil
}
Expand Down

0 comments on commit c071069

Please sign in to comment.