diversifyHash static method
Implementation
static BuBytes diversifyHash(List<int> bytes) {
const String keyDiversificationPersonalization = "z.cash:Orchard-gd";
final pallas = blockchainUtils.api.pallas;
final point = pallas.hashToCurvePasta(
domainPrefix: keyDiversificationPersonalization,
message: bytes.exc(
length: 11,
operation: "Diversify Hash",
reason: "Invalid diversify key bytes length.",
),
);
if (BytesUtils.bytesEqualConst(point, pallas.identity())) {
throw CoreErrors.orchardFailed(
"Diversify Hash",
reason: "Hash-to-curve returned the identity element",
);
}
return point;
}