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 stringEncryptAES256(string input, string key, Encoding? enc = null)AES-256 암호화
static stringDecryptAES256(string input, string key, Encoding? enc = null)AES-256 복호화
Static Methods — AES-128
static stringEncryptAES128(string input, string key, Encoding? enc = null)AES-128 암호화
static stringDecryptAES128(string input, string key, Encoding? enc = null)AES-128 복호화

public static class MathTool
값 범위 매핑, 제한, 각도/거리 계산, 사각형 생성, 점 변환 등 수학·기하 유틸리티
Static Methods — 값 변환
static longMap(long val, long min, long max, long convert_min, long convert_max)정수 범위 선형 매핑
static doubleMap(double val, double min, double max, double convert_min, double convert_max)실수 범위 선형 매핑
static TConstrain<T>(T val, T min, T max)값을 min~max 범위로 제한. byte/short/int/long/float/double 등 지원.
Static Methods — 기하
static doubleGetAngle(Point from, Point to)두 점 사이 각도 (도)
static doubleGetAngle(PointF from, PointF to)두 점 사이 각도 (부동소수점)
static doubleGetDistance(Point a, Point b)두 점 사이 거리
static doubleGetDistance(PointF a, PointF b)두 점 사이 거리 (부동소수점)
static doubleGetDistance(double x1, double y1, double z1, double x2, double y2, double z2)3D 두 점 사이 거리
static doubleGetDistance(PointF LN1, PointF LN2, PointF pt)점에서 선분까지 거리
static doubleGetDistance(double[] first, double[] second)배열 기반 유클리드 거리
static PointFRotatePoint(PointF Center, PointF Target, float angle)Center 기준으로 Target을 angle도 회전
static intStandardAngle(int angle)각도를 0~360 범위로 정규화 (int)
static floatStandardAngle(float angle)각도를 0~360 범위로 정규화 (float)
static doubleStandardAngle(double angle)각도를 0~360 범위로 정규화 (double)
static boolCompareAngle(double Angle, double StartAngle, double EndAngle)각도가 범위 내에 있는지 확인
Static Methods — 사각형/점
static int/floatCenter(int/float p1, int/float p2)두 값의 중간값
static int/floatCenterDist(int/float x, int/float dist)x 기준으로 dist 거리의 중심값
static PointCenterPoint(Rectangle rt)사각형 중심점
static PointFCenterPoint(RectangleF rt)사각형 중심점 (부동소수점)
static PointCenterPoint(Point p1, Point p2)두 점의 중심점
static PointFCenterPoint(PointF p1, PointF p2)두 점의 중심점 (부동소수점)
static PointF[]GetPoints(RectangleF rt)사각형의 4개 꼭짓점 배열 반환
static Rectangle/RectangleFMakeRectangle(여러 오버로드)두 점, 크기, 중심+크기 등으로 사각형 생성 (8+ 오버로드)
static PointFGetPointWithAngle(PointF p, float angle, float dist)원점에서 각도·거리로 점 계산
static PointFGetPointWithAngle(Point p, float angle, float dist)원점에서 각도·거리로 점 계산 (Point)
static floatGetX_WithAngle(PointF/Point p, float angle, float dist)각도·거리로 X 좌표 계산 (2개 오버로드)
static floatGetY_WithAngle(PointF/Point p, float angle, float dist)각도·거리로 Y 좌표 계산 (2개 오버로드)
static floatLinearEquationY(PointF p1, PointF p2, float x)두 점을 지나는 직선의 Y값 계산
static floatLinearEquationX(PointF p1, PointF p2, float y)두 점을 지나는 직선의 X값 계산

public class NetworkTool
IP 주소 유효성 검사, 로컬 IP 조회/설정, NIC 관리, 소켓 연결 확인
Static Methods
static boolValidIPv4(string address)IPv4 주소 형식 유효성 검사
static boolValidDomain(string address)도메인 형식 유효성 검사
static stringGetLocalIP()현재 로컬 IP 주소 반환
static boolSetLocalIP(string description, string ip, string subnet, string gateway)NIC 고정 IP 설정
static boolSetDHCP(string description)NIC DHCP 설정
static string[]GetNicDescriptions()설치된 NIC 설명 목록 반환
static boolIsSocketConnected(Socket s, int PollTime = 100)소켓 연결 상태 확인

public class WindowsTool
Windows 시스템 시간 설정, 절전 방지/허용 유틸리티
Static Methods
static voidSetLocalTime(DateTime Time)Windows 로컬 시스템 시간 설정
static voidSetSystemTime(DateTime Time)Windows UTC 시스템 시간 설정
static voidPreventSleep()디스플레이 절전 방지 (ES_DISPLAY_REQUIRED)
static voidAllowSleep()절전 방지 해제
검색 결과가 없습니다.