Add possibility to disable antireplay cache

This commit is contained in:
9seconds
2020-02-03 11:26:37 +03:00
parent 566955b8b7
commit a47edf08d0
3 changed files with 25 additions and 6 deletions
+4 -4
View File
@@ -11,19 +11,19 @@ type cache struct {
data *fastcache.Cache
}
func (c *cache) AddObfuscated2(data []byte) {
func (c cache) AddObfuscated2(data []byte) {
c.data.Set(keyObfuscated2(data), nil)
}
func (c *cache) AddTLS(data []byte) {
func (c cache) AddTLS(data []byte) {
c.data.Set(keyTLS(data), nil)
}
func (c *cache) HasObfuscated2(data []byte) bool {
func (c cache) HasObfuscated2(data []byte) bool {
return c.data.Has(keyObfuscated2(data))
}
func (c *cache) HasTLS(data []byte) bool {
func (c cache) HasTLS(data []byte) bool {
return c.data.Has(keyTLS(data))
}