You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project is the java implementation of tls-sig-api-v2. Previous asymmetric keys cannot use APIs of this version. To enable them to use APIs of this version,[see here](https://github.com/tencentyun/tls-sig-api-java).
* Function: Used to issue UserSig that is required by the TRTC and IM services.
36
+
* <p>
37
+
* Parameter description:
38
+
*
39
+
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
40
+
* @param expire - UserSig expiration time, in seconds. For example, 86400 indicates that the generated UserSig will expire one day after being generated.
* Used to issue PrivateMapKey that is optional for room entry.
77
+
* PrivateMapKey must be used together with UserSig but with more powerful permission control capabilities.
78
+
* - UserSig can only control whether a UserID has permission to use the TRTC service. As long as the UserSig is correct, the user with the corresponding UserID can enter or leave any room.
79
+
* - PrivateMapKey specifies more stringent permissions for a UserID, including whether the UserID can be used to enter a specific room and perform audio/video upstreaming in the room.
80
+
* To enable stringent PrivateMapKey permission bit verification, you need to enable permission key in TRTC console > Application Management > Application Info.
81
+
*
82
+
* Parameter description:
83
+
*
84
+
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
85
+
* @param roomid - ID of the room to which the specified UserID can enter.
86
+
* @param expire - PrivateMapKey expiration time, in seconds. For example, 86400 indicates that the generated PrivateMapKey will expire one day after being generated.
87
+
* @param privilegeMap - Permission bits. Eight bits in the same byte are used as the permission switches of eight specific features:
88
+
* - Bit 1: 0000 0001 = 1, permission for room creation
89
+
* - Bit 2: 0000 0010 = 2, permission for room entry
90
+
* - Bit 3: 0000 0100 = 4, permission for audio sending
91
+
* - Bit 4: 0000 1000 = 8, permission for audio receiving
92
+
* - Bit 5: 0001 0000 = 16, permission for video sending
93
+
* - Bit 6: 0010 0000 = 32, permission for video receiving
94
+
* - Bit 7: 0100 0000 = 64, permission for substream video sending (screen sharing)
95
+
* - Bit 8: 1000 0000 = 200, permission for substream video receiving (screen sharing)
96
+
* - privilegeMap == 1111 1111 == 255: Indicates that the UserID has all feature permissions of the room specified by roomid.
97
+
* - privilegeMap == 0010 1010 == 42: Indicates that the UserID has only the permissions to enter the room and receive audio/video data.
98
+
* @return usersig - Generate signature with userbuf
* Used to issue PrivateMapKey that is optional for room entry.
135
+
* PrivateMapKey must be used together with UserSig but with more powerful permission control capabilities.
136
+
* - UserSig can only control whether a UserID has permission to use the TRTC service. As long as the UserSig is correct, the user with the corresponding UserID can enter or leave any room.
137
+
* - PrivateMapKey specifies more stringent permissions for a UserID, including whether the UserID can be used to enter a specific room and perform audio/video upstreaming in the room.
138
+
* To enable stringent PrivateMapKey permission bit verification, you need to enable permission key in TRTC console > Application Management > Application Info.
139
+
*
140
+
* Parameter description:
141
+
*
142
+
*
143
+
* @param userid - User ID. The value can be up to 32 bytes in length and contain letters (a-z and A-Z), digits (0-9), underscores (_), and hyphens (-).
144
+
* @param roomid - ID of the room to which the specified UserID can enter.
145
+
* @param expire - PrivateMapKey expiration time, in seconds. For example, 86400 indicates that the generated PrivateMapKey will expire one day after being generated.
146
+
* @param privilegeMap - Permission bits. Eight bits in the same byte are used as the permission switches of eight specific features:
147
+
* - Bit 1: 0000 0001 = 1, permission for room creation
148
+
* - Bit 2: 0000 0010 = 2, permission for room entry
149
+
* - Bit 3: 0000 0100 = 4, permission for audio sending
150
+
* - Bit 4: 0000 1000 = 8, permission for audio receiving
151
+
* - Bit 5: 0001 0000 = 16, permission for video sending
152
+
* - Bit 6: 0010 0000 = 32, permission for video receiving
153
+
* - Bit 7: 0100 0000 = 64, permission for substream video sending (screen sharing)
154
+
* - Bit 8: 1000 0000 = 200, permission for substream video receiving (screen sharing)
155
+
* - privilegeMap == 1111 1111 == 255: Indicates that the UserID has all feature permissions of the room specified by roomid.
156
+
* - privilegeMap == 0010 1010 == 42: Indicates that the UserID has only the permissions to enter the room and receive audio/video data.
157
+
* @return usersig - Generate signature with userbuf
0 commit comments