new token format

This commit is contained in:
Jonathan Barrow 2021-11-28 11:02:22 -05:00
parent ba99290d66
commit bf3e38ec49
2 changed files with 7 additions and 6 deletions

View File

@ -47,7 +47,7 @@ func decryptToken(encryptedToken []byte) (*nexToken, error) {
mode := cipher.NewCBCDecrypter(block, iv)
mode.CryptBlocks(decryptedBody, encryptedBody)
decryptedBody = decryptedBody[:0x16] // Remove AES padding
decryptedBody = decryptedBody[:0x17] // Remove AES padding
// Verify the token body
err = verifySignature(decryptedBody, signature, hmacSecret)

11
init.go
View File

@ -22,11 +22,12 @@ type Config struct {
*/
type nexToken struct {
SystemType uint8
TokenType uint8
UserPID uint32
TitleID uint64
CreatTime uint64
SystemType uint8
TokenType uint8
UserPID uint32
AccessLevel uint8
TitleID uint64
ExpireTime uint64
}
type ConnectedUser struct {