SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
VICE.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstddef>
4
#include <span>
5
#include <string_view>
6
#include <vector>
7
8
namespace
vcryptpp::VICE
{
9
10
// https://developer.valvesoftware.com/wiki/ICE
11
// https://developer.valvesoftware.com/wiki/Encrypted_Key_Values
12
// https://wiki.alliedmods.net/Vice_keys
13
namespace
KnownCodes
{
14
15
constexpr
std::string_view
DEFAULT
=
"x9Ke0BY7"
;
16
constexpr
std::string_view
BLOODY_GOOD_TIME
=
"K4PeJwL7"
;
17
constexpr
std::string_view
CONTAGION_WEAPONS
=
"fUk0fF69"
;
18
constexpr
std::string_view
CONTAGION_SCRIPTS
=
"5!rrFz6p"
;
19
constexpr
std::string_view
COUNTER_STRIKE_SOURCE
=
"d7NSuLq2"
;
20
constexpr
std::string_view
COUNTER_STRIKE_GLOBAL_OFFENSIVE
=
COUNTER_STRIKE_SOURCE
;
21
constexpr
std::string_view
COUNTER_STRIKE_2
=
COUNTER_STRIKE_GLOBAL_OFFENSIVE
;
22
constexpr
std::string_view
COUNTER_STRIKE_PROMOD
=
"H1aRQ0n1"
;
23
constexpr
std::string_view
DAY_OF_DEFEAT_SOURCE
=
"Wl0u5B3F"
;
24
constexpr
std::string_view
DYSTOPIA_1_2
=
"pH3apO8w"
;
25
constexpr
std::string_view
DYSTOPIA_1_3
=
"G8stUh3F"
;
26
constexpr
std::string_view
FORTRESS_FOREVER_PRE_GREENLIGHT
=
"saxEWr5v"
;
27
constexpr
std::string_view
GOLDEN_EYE_SOURCE
=
"Gr3naDes"
;
28
constexpr
std::string_view
HALF_LIFE_2_CTF
=
"R1dj3axP"
;
29
constexpr
std::string_view
HALF_LIFE_2_DM
=
DEFAULT
;
30
constexpr
std::string_view
INSURGENCY
=
"DrA5e3EB"
;
31
constexpr
std::string_view
LEFT_4_DEAD_2
=
"SDhfi878"
;
32
constexpr
std::string_view
NO_MORE_ROOM_IN_HELL
=
"lREeeapA"
;
33
constexpr
std::string_view
NUCLEAR_DAWN
=
"TA+*veh9"
;
34
constexpr
std::string_view
TACTICAL_INTERVENTION
=
"71B4Dt1Z"
;
35
constexpr
std::string_view
TEAM_FORTRESS_2
=
"E2NcUkG2"
;
36
constexpr
std::string_view
TEAM_FORTRESS_2_ITEMS
=
"A5fSXbf7"
;
37
constexpr
std::string_view
FAIRY_TALE_BUSTERS
=
TEAM_FORTRESS_2
;
38
constexpr
std::string_view
THE_SHIP
=
"eb3A4m79"
;
39
constexpr
std::string_view
VALVE_TRACKER
=
"\rU\xf3\xd3\xad\x06WG"
;
40
constexpr
std::string_view
ZOMBIE_PANIC_SOURCE
=
"5R0ni0pZ"
;
41
42
constexpr
std::string_view
GPU_DEFAULT
=
"X8bU2qll"
;
43
constexpr
std::string_view
GPU_ALIEN_SWARM
=
"sW9.JupP"
;
44
constexpr
std::string_view
GPU_DOTA_2
=
"dAIt1IL!"
;
45
constexpr
std::string_view
GPU_HALF_LIFE_2_EPISODE_2
=
"Xx81uBl)"
;
46
constexpr
std::string_view
GPU_LEFT_4_DEAD_1
=
"zp14Hi(]"
;
47
constexpr
std::string_view
GPU_LEFT_4_DEAD_2
=
GPU_LEFT_4_DEAD_1
;
48
constexpr
std::string_view
GPU_PORTAL_2
=
"UrE66!Ap"
;
49
constexpr
std::string_view
GPU_TEAM_FORTRESS_2
=
TEAM_FORTRESS_2
;
50
51
}
// namespace KnownCodes
52
53
[[nodiscard]] std::vector<std::byte>
encrypt
(std::span<const std::byte> data, std::string_view code =
KnownCodes::DEFAULT
);
54
55
[[nodiscard]] std::vector<std::byte>
decrypt
(std::span<const std::byte> data, std::string_view code =
KnownCodes::DEFAULT
);
56
57
}
// namespace vcryptpp::VICE
vcryptpp::VICE::KnownCodes
Definition
VICE.h:13
vcryptpp::VICE::KnownCodes::DYSTOPIA_1_3
constexpr std::string_view DYSTOPIA_1_3
Definition
VICE.h:25
vcryptpp::VICE::KnownCodes::GPU_ALIEN_SWARM
constexpr std::string_view GPU_ALIEN_SWARM
Definition
VICE.h:43
vcryptpp::VICE::KnownCodes::CONTAGION_SCRIPTS
constexpr std::string_view CONTAGION_SCRIPTS
Definition
VICE.h:18
vcryptpp::VICE::KnownCodes::GPU_TEAM_FORTRESS_2
constexpr std::string_view GPU_TEAM_FORTRESS_2
Definition
VICE.h:49
vcryptpp::VICE::KnownCodes::NO_MORE_ROOM_IN_HELL
constexpr std::string_view NO_MORE_ROOM_IN_HELL
Definition
VICE.h:32
vcryptpp::VICE::KnownCodes::FAIRY_TALE_BUSTERS
constexpr std::string_view FAIRY_TALE_BUSTERS
Definition
VICE.h:37
vcryptpp::VICE::KnownCodes::GPU_LEFT_4_DEAD_2
constexpr std::string_view GPU_LEFT_4_DEAD_2
Definition
VICE.h:47
vcryptpp::VICE::KnownCodes::DYSTOPIA_1_2
constexpr std::string_view DYSTOPIA_1_2
Definition
VICE.h:24
vcryptpp::VICE::KnownCodes::GPU_HALF_LIFE_2_EPISODE_2
constexpr std::string_view GPU_HALF_LIFE_2_EPISODE_2
Definition
VICE.h:45
vcryptpp::VICE::KnownCodes::HALF_LIFE_2_CTF
constexpr std::string_view HALF_LIFE_2_CTF
Definition
VICE.h:28
vcryptpp::VICE::KnownCodes::COUNTER_STRIKE_SOURCE
constexpr std::string_view COUNTER_STRIKE_SOURCE
Definition
VICE.h:19
vcryptpp::VICE::KnownCodes::COUNTER_STRIKE_PROMOD
constexpr std::string_view COUNTER_STRIKE_PROMOD
Definition
VICE.h:22
vcryptpp::VICE::KnownCodes::GPU_DEFAULT
constexpr std::string_view GPU_DEFAULT
Definition
VICE.h:42
vcryptpp::VICE::KnownCodes::COUNTER_STRIKE_GLOBAL_OFFENSIVE
constexpr std::string_view COUNTER_STRIKE_GLOBAL_OFFENSIVE
Definition
VICE.h:20
vcryptpp::VICE::KnownCodes::GPU_DOTA_2
constexpr std::string_view GPU_DOTA_2
Definition
VICE.h:44
vcryptpp::VICE::KnownCodes::DAY_OF_DEFEAT_SOURCE
constexpr std::string_view DAY_OF_DEFEAT_SOURCE
Definition
VICE.h:23
vcryptpp::VICE::KnownCodes::DEFAULT
constexpr std::string_view DEFAULT
Definition
VICE.h:15
vcryptpp::VICE::KnownCodes::GPU_PORTAL_2
constexpr std::string_view GPU_PORTAL_2
Definition
VICE.h:48
vcryptpp::VICE::KnownCodes::THE_SHIP
constexpr std::string_view THE_SHIP
Definition
VICE.h:38
vcryptpp::VICE::KnownCodes::ZOMBIE_PANIC_SOURCE
constexpr std::string_view ZOMBIE_PANIC_SOURCE
Definition
VICE.h:40
vcryptpp::VICE::KnownCodes::TEAM_FORTRESS_2_ITEMS
constexpr std::string_view TEAM_FORTRESS_2_ITEMS
Definition
VICE.h:36
vcryptpp::VICE::KnownCodes::INSURGENCY
constexpr std::string_view INSURGENCY
Definition
VICE.h:30
vcryptpp::VICE::KnownCodes::TEAM_FORTRESS_2
constexpr std::string_view TEAM_FORTRESS_2
Definition
VICE.h:35
vcryptpp::VICE::KnownCodes::HALF_LIFE_2_DM
constexpr std::string_view HALF_LIFE_2_DM
Definition
VICE.h:29
vcryptpp::VICE::KnownCodes::COUNTER_STRIKE_2
constexpr std::string_view COUNTER_STRIKE_2
Definition
VICE.h:21
vcryptpp::VICE::KnownCodes::CONTAGION_WEAPONS
constexpr std::string_view CONTAGION_WEAPONS
Definition
VICE.h:17
vcryptpp::VICE::KnownCodes::VALVE_TRACKER
constexpr std::string_view VALVE_TRACKER
Definition
VICE.h:39
vcryptpp::VICE::KnownCodes::BLOODY_GOOD_TIME
constexpr std::string_view BLOODY_GOOD_TIME
Definition
VICE.h:16
vcryptpp::VICE::KnownCodes::NUCLEAR_DAWN
constexpr std::string_view NUCLEAR_DAWN
Definition
VICE.h:33
vcryptpp::VICE::KnownCodes::FORTRESS_FOREVER_PRE_GREENLIGHT
constexpr std::string_view FORTRESS_FOREVER_PRE_GREENLIGHT
Definition
VICE.h:26
vcryptpp::VICE::KnownCodes::GOLDEN_EYE_SOURCE
constexpr std::string_view GOLDEN_EYE_SOURCE
Definition
VICE.h:27
vcryptpp::VICE::KnownCodes::LEFT_4_DEAD_2
constexpr std::string_view LEFT_4_DEAD_2
Definition
VICE.h:31
vcryptpp::VICE::KnownCodes::GPU_LEFT_4_DEAD_1
constexpr std::string_view GPU_LEFT_4_DEAD_1
Definition
VICE.h:46
vcryptpp::VICE::KnownCodes::TACTICAL_INTERVENTION
constexpr std::string_view TACTICAL_INTERVENTION
Definition
VICE.h:34
vcryptpp::VICE
Definition
VICE.h:8
vcryptpp::VICE::decrypt
std::vector< std::byte > decrypt(std::span< const std::byte > data, std::string_view code=KnownCodes::DEFAULT)
Definition
VICE.cpp:48
vcryptpp::VICE::encrypt
std::vector< std::byte > encrypt(std::span< const std::byte > data, std::string_view code=KnownCodes::DEFAULT)
Definition
VICE.cpp:44
include
vcryptpp
VICE.h
Generated on
for SourcePP by
1.17.0