Compare commits
	
		
			1 Commits
		
	
	
		
			v2.1.3-alp
			...
			v2.1.4-alp
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						b4ec470e2f
	
				 | 
					
					
						
@@ -6,10 +6,18 @@ import (
 | 
				
			|||||||
	"encoding/hex"
 | 
						"encoding/hex"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func GenerateVerifyKey(key string) string {
 | 
					func generateHMAC(key string, data string) string {
 | 
				
			||||||
	mac := hmac.New(md5.New, []byte(key))
 | 
						mac := hmac.New(md5.New, []byte(key))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mac.Write([]byte(key))
 | 
						mac.Write([]byte(data))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return hex.EncodeToString(mac.Sum(nil))
 | 
						return hex.EncodeToString(mac.Sum(nil))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func GenerateVerifyKey(key string) string {
 | 
				
			||||||
 | 
						return generateHMAC(key, key)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func GeneratePasswordHash(password string) string {
 | 
				
			||||||
 | 
						return generateHMAC("streaming", password)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user