Compare commits
	
		
			4 Commits
		
	
	
		
			v2.1.3-alp
			...
			v2.1.7-alp
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						92e59cf650
	
				 | 
					
					
						|||
| 
						
						
							
						
						5c5496fa7f
	
				 | 
					
					
						|||
| 
						
						
							
						
						2737e23369
	
				 | 
					
					
						|||
| 
						
						
							
						
						b4ec470e2f
	
				 | 
					
					
						
@@ -96,7 +96,7 @@ type EventModelGetAlarmInfoStatusResponse struct {
 | 
			
		||||
	MotionDetectionAlarm []MotionDetectionAlarmStatus `json:"MD"`
 | 
			
		||||
	IOAlarm              []IOAlarmStatus              `json:"IO"`
 | 
			
		||||
	StorageAlarm         []StorageAlarmStatus         `json:"ST"`
 | 
			
		||||
	StorageAlarmParameters []CameraCoveredAlarmStatus   `json:"VS"`
 | 
			
		||||
	CameraCoveredAlarm   []CameraCoveredAlarmStatus   `json:"VS"`
 | 
			
		||||
	VideoLossAlarm       []VideoLossAlarmStatus       `json:"VL"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -117,9 +117,8 @@ type IOAlarmStatus struct {
 | 
			
		||||
 | 
			
		||||
// 3.4.1.4.4
 | 
			
		||||
type CameraCoveredAlarmStatus struct {
 | 
			
		||||
	ChannelMask uint `json:"CH"`
 | 
			
		||||
	AlarmMask   uint `json:"AT"`
 | 
			
		||||
	StatusMask  uint `json:"AS"`
 | 
			
		||||
	Status uint `json:"ISA"`
 | 
			
		||||
	Mask   uint `json:"LCH"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 3.4.1.4.4
 | 
			
		||||
 
 | 
			
		||||
@@ -281,12 +281,12 @@ type REDEV struct {
 | 
			
		||||
	SW      int    // Источник поступаемого сигнала
 | 
			
		||||
	REPORT  int    // Порт камеры
 | 
			
		||||
	REIP    string // IP камеры
 | 
			
		||||
	ID      int    // Идентификатор камеры
 | 
			
		||||
	ID      string // Идентификатор камеры
 | 
			
		||||
	RENAME  string // Название устройства
 | 
			
		||||
	USER    string // Имя пользователя
 | 
			
		||||
	PWD     string // Пароль
 | 
			
		||||
	URL     string // ???
 | 
			
		||||
	CMDPORT string // ???
 | 
			
		||||
	CMDPORT uint   // ???
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 7.29
 | 
			
		||||
 
 | 
			
		||||
@@ -6,10 +6,18 @@ import (
 | 
			
		||||
	"encoding/hex"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func GenerateVerifyKey(key string) string {
 | 
			
		||||
func generateHMAC(key string, data string) string {
 | 
			
		||||
	mac := hmac.New(md5.New, []byte(key))
 | 
			
		||||
 | 
			
		||||
	mac.Write([]byte(key))
 | 
			
		||||
	mac.Write([]byte(data))
 | 
			
		||||
 | 
			
		||||
	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