Tools
네임스페이스 Going.Basis.Tools — 암호화, 수학, 네트워크, Windows 시스템 유틸리티
public class CryptoTool
Base64 인코딩/디코딩, AES-256/AES-128 암호화·복호화 유틸리티
Static Methods — Base64
| static string? | EncodeBase64String | (string data, Encoding? enc = null) | 문자열 → Base64 |
| static string? | EncodeBase64String | (byte[] data) | 바이트 배열 → Base64 |
| static T? | DecodeBase64String<T> | (string data, Encoding? enc = null) | Base64 → 지정 타입으로 역직렬화 |
Static Methods — AES-256
| static string | EncryptAES256 | (string input, string key, Encoding? enc = null) | AES-256 암호화 |
| static string | DecryptAES256 | (string input, string key, Encoding? enc = null) | AES-256 복호화 |
Static Methods — AES-128
| static string | EncryptAES128 | (string input, string key, Encoding? enc = null) | AES-128 암호화 |
| static string | DecryptAES128 | (string input, string key, Encoding? enc = null) | AES-128 복호화 |
public static class MathTool
값 범위 매핑, 제한, 각도/거리 계산, 사각형 생성, 점 변환 등 수학·기하 유틸리티
Static Methods — 값 변환
| static long | Map | (long val, long min, long max, long convert_min, long convert_max) | 정수 범위 선형 매핑 |
| static double | Map | (double val, double min, double max, double convert_min, double convert_max) | 실수 범위 선형 매핑 |
| static T | Constrain<T> | (T val, T min, T max) | 값을 min~max 범위로 제한. byte/short/int/long/float/double 등 지원. |
Static Methods — 기하
| static double | GetAngle | (Point from, Point to) | 두 점 사이 각도 (도) |
| static double | GetAngle | (PointF from, PointF to) | 두 점 사이 각도 (부동소수점) |
| static double | GetDistance | (Point a, Point b) | 두 점 사이 거리 |
| static double | GetDistance | (PointF a, PointF b) | 두 점 사이 거리 (부동소수점) |
| static double | GetDistance | (double x1, double y1, double z1, double x2, double y2, double z2) | 3D 두 점 사이 거리 |
| static double | GetDistance | (PointF LN1, PointF LN2, PointF pt) | 점에서 선분까지 거리 |
| static double | GetDistance | (double[] first, double[] second) | 배열 기반 유클리드 거리 |
| static PointF | RotatePoint | (PointF Center, PointF Target, float angle) | Center 기준으로 Target을 angle도 회전 |
| static int | StandardAngle | (int angle) | 각도를 0~360 범위로 정규화 (int) |
| static float | StandardAngle | (float angle) | 각도를 0~360 범위로 정규화 (float) |
| static double | StandardAngle | (double angle) | 각도를 0~360 범위로 정규화 (double) |
| static bool | CompareAngle | (double Angle, double StartAngle, double EndAngle) | 각도가 범위 내에 있는지 확인 |
Static Methods — 사각형/점
| static int/float | Center | (int/float p1, int/float p2) | 두 값의 중간값 |
| static int/float | CenterDist | (int/float x, int/float dist) | x 기준으로 dist 거리의 중심값 |
| static Point | CenterPoint | (Rectangle rt) | 사각형 중심점 |
| static PointF | CenterPoint | (RectangleF rt) | 사각형 중심점 (부동소수점) |
| static Point | CenterPoint | (Point p1, Point p2) | 두 점의 중심점 |
| static PointF | CenterPoint | (PointF p1, PointF p2) | 두 점의 중심점 (부동소수점) |
| static PointF[] | GetPoints | (RectangleF rt) | 사각형의 4개 꼭짓점 배열 반환 |
| static Rectangle/RectangleF | MakeRectangle | (여러 오버로드) | 두 점, 크기, 중심+크기 등으로 사각형 생성 (8+ 오버로드) |
| static PointF | GetPointWithAngle | (PointF p, float angle, float dist) | 원점에서 각도·거리로 점 계산 |
| static PointF | GetPointWithAngle | (Point p, float angle, float dist) | 원점에서 각도·거리로 점 계산 (Point) |
| static float | GetX_WithAngle | (PointF/Point p, float angle, float dist) | 각도·거리로 X 좌표 계산 (2개 오버로드) |
| static float | GetY_WithAngle | (PointF/Point p, float angle, float dist) | 각도·거리로 Y 좌표 계산 (2개 오버로드) |
| static float | LinearEquationY | (PointF p1, PointF p2, float x) | 두 점을 지나는 직선의 Y값 계산 |
| static float | LinearEquationX | (PointF p1, PointF p2, float y) | 두 점을 지나는 직선의 X값 계산 |
public class NetworkTool
IP 주소 유효성 검사, 로컬 IP 조회/설정, NIC 관리, 소켓 연결 확인
Static Methods
| static bool | ValidIPv4 | (string address) | IPv4 주소 형식 유효성 검사 |
| static bool | ValidDomain | (string address) | 도메인 형식 유효성 검사 |
| static string | GetLocalIP | () | 현재 로컬 IP 주소 반환 |
| static bool | SetLocalIP | (string description, string ip, string subnet, string gateway) | NIC 고정 IP 설정 |
| static bool | SetDHCP | (string description) | NIC DHCP 설정 |
| static string[] | GetNicDescriptions | () | 설치된 NIC 설명 목록 반환 |
| static bool | IsSocketConnected | (Socket s, int PollTime = 100) | 소켓 연결 상태 확인 |
public class WindowsTool
Windows 시스템 시간 설정, 절전 방지/허용 유틸리티
Static Methods
| static void | SetLocalTime | (DateTime Time) | Windows 로컬 시스템 시간 설정 |
| static void | SetSystemTime | (DateTime Time) | Windows UTC 시스템 시간 설정 |
| static void | PreventSleep | () | 디스플레이 절전 방지 (ES_DISPLAY_REQUIRED) |
| static void | AllowSleep | () | 절전 방지 해제 |
검색 결과가 없습니다.