Digest
classin packageklyn.cryptography
public class Digest extends Object:
└ Digest
Immutable digest result with both hexadecimal and Base64 views.
import klyn.cryptography

digest = SHA256().digestInfo("hello")
print(digest.hex)
print(digest.base64)
Fields
Modifier and Type Member Description
public readonly algorithm
algorithm as String
Canonical digest algorithm name.
public readonly base64
base64 as String
Standard Base64 representation.
public readonly hex
hex as String
Lower-case hexadecimal representation.
Properties
Modifier and Type Member Description
public readonly property sizeBits
sizeBits as Int:
Digest size in bits.
public readonly property sizeBytes
sizeBytes as Int:
Digest size in bytes.
Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public Digest
Digest(algorithm as String, hex as String, base64 as String):
Creates a digest result.
Methods
Modifier and Type Member Description
public static fromMap
fromMap(value as Map<String, Object>) as Digest:
No summary.
public toBytes
toBytes() as Byte[] throws CryptoException:
Returns the raw digest bytes.
public toMap
toMap() as Map<String, Object>:
Converts this digest result to a serializable map.
public override toString
toString() as String:
No summary.
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml