SecurityTextType Tutorial
This tutorial provides an overview of the SecurityTextType
interface, which is part of the lightweight-component/aj-util
library. The SecurityTextType
interface defines enums for various security-related text encoding and hashing types.
Introduction
The SecurityTextType
interface contains nested enums that categorize different types of:
- Text encoding formats
- Digest (hash) algorithms
- Cryptographic operations
Enums
1. Encode
Defines various text encoding formats:
BASE16
- Hexadecimal encodingBASE32
- Base32 encodingBASE58
- Base58 encoding (used in Bitcoin)BASE64
- Base64 encodingBASE91
- Base91 encoding
2. Digest
Defines message digest (hash) algorithms:
Md5
- MD5 hashMd5WithSalt
- MD5 hash with salt
3. Cryptography
Currently empty, reserved for future cryptographic operation types.
Usage Examples
SecurityTextType.Encode encoding = SecurityTextType.Encode.BASE64;
SecurityTextType.Digest digest = SecurityTextType.Digest.Md5WithSalt;
Conclusion
The SecurityTextType
interface provides a type-safe way to reference different security-related text encoding and hashing algorithms throughout the application.