CryptData class

A parsed PHC / Modular Crypt Format string: an algorithm id with an optional version, params, salt, and hash.

Constructors

CryptData(String id, {String? salt, String? hash, String? version, Map<String, String>? params})
Creates an instance of CryptData.
const

Properties

hash → String?
(Optional) The output hash.
final
hashCode → int
The hash code for this object.
no setteroverride
id → String
The symbolic name for the hash function.
final
params → Map<String, String>?
(Optional) The algorithm parameters.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
salt → String?
(Optional) The salt.
final
version → String?
(Optional) The algorithm version.
final

Methods

getIntParam(String key) → int?
Get the value of a parameter by key as integer
getParam(String key) → String?
Get the value of a parameter by key
hashBytes() → Uint8List?
Parse the hash using standard Base-64 codec
hasParam(String key) → bool
Check if the key parameter exists
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saltBytes() → Uint8List?
Parse the salt using standard Base-64 codec
toString() → String
A string representation of this object.
inherited
validate() → void
Validate this PHC string. Throws ArgumentError when any field is invalid.
versionInt() → int?
Get the version as integer

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

builder(String id) → CryptDataBuilder
Returns a CryptDataBuilder instance for id.