-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.cpp
More file actions
executable file
·39 lines (33 loc) · 876 Bytes
/
Test.cpp
File metadata and controls
executable file
·39 lines (33 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Name: Base62 From Base64
// Data: 2018.10.14
// Editer: Hwanin
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include "Base62.h"
// Function : main
// Parameter : ...
// Return : (int)0
int main(int argv, char* argc[])
{
Base62 base62;
srand((unsigned int)time(nullptr));
int i = 0;
int nRand = 0;
std::string strTest = "\0";
while (i < 1000)
{
nRand = rand();
strTest.push_back(nRand % (126-33) + '!');
i++;
}
std::cout << "String" << std::endl;
std::cout << strTest << std::endl;
strTest = base62.Base62Encode(strTest);
std::cout << "Encode" << std::endl;
std::cout << strTest << std::endl;
strTest = base62.Base62Decode(strTest);
std::cout << "Decode" << std::endl;
std::cout << strTest << std::endl;
return 0;
}