import { slh_dsa_sha2_128s_keypair, slh_dsa_sha2_128s_sign, slh_dsa_sha2_128s_sign_internal, slh_dsa_sha2_128s_verify, slh_dsa_sha2_128s_verify_internal, slh_dsa_sha2_128f_keypair, slh_dsa_sha2_128f_sign, slh_dsa_sha2_128f_sign_internal, slh_dsa_sha2_128f_verify, slh_dsa_sha2_128f_verify_internal, slh_dsa_sha2_192s_keypair, slh_dsa_sha2_192s_sign, slh_dsa_sha2_192s_sign_internal, slh_dsa_sha2_192s_verify, slh_dsa_sha2_192s_verify_internal, slh_dsa_sha2_192f_keypair, slh_dsa_sha2_192f_sign, slh_dsa_sha2_192f_sign_internal, slh_dsa_sha2_192f_verify, slh_dsa_sha2_192f_verify_internal, slh_dsa_sha2_256s_keypair, slh_dsa_sha2_256s_sign, slh_dsa_sha2_256s_sign_internal, slh_dsa_sha2_256s_verify, slh_dsa_sha2_256s_verify_internal, slh_dsa_sha2_256f_keypair, slh_dsa_sha2_256f_sign, slh_dsa_sha2_256f_sign_internal, slh_dsa_sha2_256f_verify, slh_dsa_sha2_256f_verify_internal, slh_dsa_shake_128s_keypair, slh_dsa_shake_128s_sign, slh_dsa_shake_128s_sign_internal, slh_dsa_shake_128s_verify, slh_dsa_shake_128s_verify_internal, slh_dsa_shake_128f_keypair, slh_dsa_shake_128f_sign, slh_dsa_shake_128f_sign_internal, slh_dsa_shake_128f_verify, slh_dsa_shake_128f_verify_internal, slh_dsa_shake_192s_keypair, slh_dsa_shake_192s_sign, slh_dsa_shake_192s_sign_internal, slh_dsa_shake_192s_verify, slh_dsa_shake_192s_verify_internal, slh_dsa_shake_192f_keypair, slh_dsa_shake_192f_sign, slh_dsa_shake_192f_sign_internal, slh_dsa_shake_192f_verify, slh_dsa_shake_192f_verify_internal, slh_dsa_shake_256s_keypair, slh_dsa_shake_256s_sign, slh_dsa_shake_256s_sign_internal, slh_dsa_shake_256s_verify, slh_dsa_shake_256s_verify_internal, slh_dsa_shake_256f_keypair, slh_dsa_shake_256f_sign, slh_dsa_shake_256f_sign_internal, slh_dsa_shake_256f_verify, slh_dsa_shake_256f_verify_internal, } from "./rs-webbuf_slhdsa-inline-base64/webbuf_slhdsa.js";
import { WebBuf } from "@webbuf/webbuf";
import { FixedBuf } from "@webbuf/fixedbuf";
export const SLH_DSA_SHA2_128S = {
    seedSize: 16,
    verifyingKeySize: 32,
    signingKeySize: 64,
    signatureSize: 7856,
};
export const SLH_DSA_SHA2_128F = {
    seedSize: 16,
    verifyingKeySize: 32,
    signingKeySize: 64,
    signatureSize: 17088,
};
export const SLH_DSA_SHA2_192S = {
    seedSize: 24,
    verifyingKeySize: 48,
    signingKeySize: 96,
    signatureSize: 16224,
};
export const SLH_DSA_SHA2_192F = {
    seedSize: 24,
    verifyingKeySize: 48,
    signingKeySize: 96,
    signatureSize: 35664,
};
export const SLH_DSA_SHA2_256S = {
    seedSize: 32,
    verifyingKeySize: 64,
    signingKeySize: 128,
    signatureSize: 29792,
};
export const SLH_DSA_SHA2_256F = {
    seedSize: 32,
    verifyingKeySize: 64,
    signingKeySize: 128,
    signatureSize: 49856,
};
export const SLH_DSA_SHAKE_128S = SLH_DSA_SHA2_128S;
export const SLH_DSA_SHAKE_128F = SLH_DSA_SHA2_128F;
export const SLH_DSA_SHAKE_192S = SLH_DSA_SHA2_192S;
export const SLH_DSA_SHAKE_192F = SLH_DSA_SHA2_192F;
export const SLH_DSA_SHAKE_256S = SLH_DSA_SHA2_256S;
export const SLH_DSA_SHAKE_256F = SLH_DSA_SHA2_256F;
const EMPTY_OPT_RAND = WebBuf.alloc(0);
function splitKeypair(out, vkSize, skSize) {
    const vk = WebBuf.fromUint8Array(out.subarray(0, vkSize));
    const sk = WebBuf.fromUint8Array(out.subarray(vkSize, vkSize + skSize));
    return {
        verifyingKey: FixedBuf.fromBuf(vkSize, vk),
        signingKey: FixedBuf.fromBuf(skSize, sk),
    };
}
function randomSeed(size) {
    return FixedBuf.fromRandom(size);
}
function defaultContext(context) {
    return context ?? WebBuf.alloc(0);
}
function requireAllSeeds(name, seedSize, skSeed, skPrf, pkSeed) {
    if (skSeed === undefined && skPrf === undefined && pkSeed === undefined) {
        return [randomSeed(seedSize), randomSeed(seedSize), randomSeed(seedSize)];
    }
    if (skSeed === undefined || skPrf === undefined || pkSeed === undefined) {
        throw new Error(`${name} requires all three seeds, or none`);
    }
    return [skSeed, skPrf, pkSeed];
}
function slhSignHedged(sign, signatureSize, seedSize, signingKey, message, context) {
    return slhSignDeterministic(sign, signatureSize, signingKey, message, context, randomSeed(seedSize));
}
function slhSignDeterministic(sign, signatureSize, signingKey, message, context, addrnd) {
    const out = sign(signingKey.buf, message, defaultContext(context), addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(signatureSize, WebBuf.fromUint8Array(out));
}
function slhVerify(verify, verifyingKey, message, signature, context) {
    return verify(verifyingKey.buf, message, signature.buf, defaultContext(context));
}
export function slhDsaSha2_128sKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaSha2_128sKeyPair", 16, skSeed, skPrf, pkSeed);
    return slhDsaSha2_128sKeyPairDeterministic(...seeds);
}
export function slhDsaSha2_128sKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_sha2_128s_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 32, 64);
}
export function slhDsaSha2_128sSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_sha2_128s_sign, 7856, 16, signingKey, message, context);
}
export function slhDsaSha2_128sSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_sha2_128s_sign, 7856, signingKey, message, context);
}
export function slhDsaSha2_128sVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_sha2_128s_verify, verifyingKey, message, signature, context);
}
export function slhDsaSha2_128sSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_sha2_128s_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(7856, WebBuf.fromUint8Array(out));
}
export function slhDsaSha2_128sVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_sha2_128s_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaSha2_128fKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaSha2_128fKeyPair", 16, skSeed, skPrf, pkSeed);
    return slhDsaSha2_128fKeyPairDeterministic(...seeds);
}
export function slhDsaSha2_128fKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_sha2_128f_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 32, 64);
}
export function slhDsaSha2_128fSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_sha2_128f_sign, 17088, 16, signingKey, message, context);
}
export function slhDsaSha2_128fSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_sha2_128f_sign, 17088, signingKey, message, context);
}
export function slhDsaSha2_128fVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_sha2_128f_verify, verifyingKey, message, signature, context);
}
export function slhDsaSha2_128fSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_sha2_128f_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(17088, WebBuf.fromUint8Array(out));
}
export function slhDsaSha2_128fVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_sha2_128f_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaSha2_192sKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaSha2_192sKeyPair", 24, skSeed, skPrf, pkSeed);
    return slhDsaSha2_192sKeyPairDeterministic(...seeds);
}
export function slhDsaSha2_192sKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_sha2_192s_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 48, 96);
}
export function slhDsaSha2_192sSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_sha2_192s_sign, 16224, 24, signingKey, message, context);
}
export function slhDsaSha2_192sSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_sha2_192s_sign, 16224, signingKey, message, context);
}
export function slhDsaSha2_192sVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_sha2_192s_verify, verifyingKey, message, signature, context);
}
export function slhDsaSha2_192sSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_sha2_192s_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(16224, WebBuf.fromUint8Array(out));
}
export function slhDsaSha2_192sVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_sha2_192s_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaSha2_192fKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaSha2_192fKeyPair", 24, skSeed, skPrf, pkSeed);
    return slhDsaSha2_192fKeyPairDeterministic(...seeds);
}
export function slhDsaSha2_192fKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_sha2_192f_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 48, 96);
}
export function slhDsaSha2_192fSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_sha2_192f_sign, 35664, 24, signingKey, message, context);
}
export function slhDsaSha2_192fSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_sha2_192f_sign, 35664, signingKey, message, context);
}
export function slhDsaSha2_192fVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_sha2_192f_verify, verifyingKey, message, signature, context);
}
export function slhDsaSha2_192fSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_sha2_192f_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(35664, WebBuf.fromUint8Array(out));
}
export function slhDsaSha2_192fVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_sha2_192f_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaSha2_256sKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaSha2_256sKeyPair", 32, skSeed, skPrf, pkSeed);
    return slhDsaSha2_256sKeyPairDeterministic(...seeds);
}
export function slhDsaSha2_256sKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_sha2_256s_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 64, 128);
}
export function slhDsaSha2_256sSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_sha2_256s_sign, 29792, 32, signingKey, message, context);
}
export function slhDsaSha2_256sSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_sha2_256s_sign, 29792, signingKey, message, context);
}
export function slhDsaSha2_256sVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_sha2_256s_verify, verifyingKey, message, signature, context);
}
export function slhDsaSha2_256sSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_sha2_256s_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(29792, WebBuf.fromUint8Array(out));
}
export function slhDsaSha2_256sVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_sha2_256s_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaSha2_256fKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaSha2_256fKeyPair", 32, skSeed, skPrf, pkSeed);
    return slhDsaSha2_256fKeyPairDeterministic(...seeds);
}
export function slhDsaSha2_256fKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_sha2_256f_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 64, 128);
}
export function slhDsaSha2_256fSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_sha2_256f_sign, 49856, 32, signingKey, message, context);
}
export function slhDsaSha2_256fSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_sha2_256f_sign, 49856, signingKey, message, context);
}
export function slhDsaSha2_256fVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_sha2_256f_verify, verifyingKey, message, signature, context);
}
export function slhDsaSha2_256fSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_sha2_256f_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(49856, WebBuf.fromUint8Array(out));
}
export function slhDsaSha2_256fVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_sha2_256f_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaShake_128sKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaShake_128sKeyPair", 16, skSeed, skPrf, pkSeed);
    return slhDsaShake_128sKeyPairDeterministic(...seeds);
}
export function slhDsaShake_128sKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_shake_128s_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 32, 64);
}
export function slhDsaShake_128sSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_shake_128s_sign, 7856, 16, signingKey, message, context);
}
export function slhDsaShake_128sSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_shake_128s_sign, 7856, signingKey, message, context);
}
export function slhDsaShake_128sVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_shake_128s_verify, verifyingKey, message, signature, context);
}
export function slhDsaShake_128sSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_shake_128s_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(7856, WebBuf.fromUint8Array(out));
}
export function slhDsaShake_128sVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_shake_128s_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaShake_128fKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaShake_128fKeyPair", 16, skSeed, skPrf, pkSeed);
    return slhDsaShake_128fKeyPairDeterministic(...seeds);
}
export function slhDsaShake_128fKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_shake_128f_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 32, 64);
}
export function slhDsaShake_128fSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_shake_128f_sign, 17088, 16, signingKey, message, context);
}
export function slhDsaShake_128fSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_shake_128f_sign, 17088, signingKey, message, context);
}
export function slhDsaShake_128fVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_shake_128f_verify, verifyingKey, message, signature, context);
}
export function slhDsaShake_128fSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_shake_128f_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(17088, WebBuf.fromUint8Array(out));
}
export function slhDsaShake_128fVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_shake_128f_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaShake_192sKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaShake_192sKeyPair", 24, skSeed, skPrf, pkSeed);
    return slhDsaShake_192sKeyPairDeterministic(...seeds);
}
export function slhDsaShake_192sKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_shake_192s_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 48, 96);
}
export function slhDsaShake_192sSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_shake_192s_sign, 16224, 24, signingKey, message, context);
}
export function slhDsaShake_192sSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_shake_192s_sign, 16224, signingKey, message, context);
}
export function slhDsaShake_192sVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_shake_192s_verify, verifyingKey, message, signature, context);
}
export function slhDsaShake_192sSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_shake_192s_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(16224, WebBuf.fromUint8Array(out));
}
export function slhDsaShake_192sVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_shake_192s_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaShake_192fKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaShake_192fKeyPair", 24, skSeed, skPrf, pkSeed);
    return slhDsaShake_192fKeyPairDeterministic(...seeds);
}
export function slhDsaShake_192fKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_shake_192f_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 48, 96);
}
export function slhDsaShake_192fSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_shake_192f_sign, 35664, 24, signingKey, message, context);
}
export function slhDsaShake_192fSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_shake_192f_sign, 35664, signingKey, message, context);
}
export function slhDsaShake_192fVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_shake_192f_verify, verifyingKey, message, signature, context);
}
export function slhDsaShake_192fSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_shake_192f_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(35664, WebBuf.fromUint8Array(out));
}
export function slhDsaShake_192fVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_shake_192f_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaShake_256sKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaShake_256sKeyPair", 32, skSeed, skPrf, pkSeed);
    return slhDsaShake_256sKeyPairDeterministic(...seeds);
}
export function slhDsaShake_256sKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_shake_256s_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 64, 128);
}
export function slhDsaShake_256sSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_shake_256s_sign, 29792, 32, signingKey, message, context);
}
export function slhDsaShake_256sSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_shake_256s_sign, 29792, signingKey, message, context);
}
export function slhDsaShake_256sVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_shake_256s_verify, verifyingKey, message, signature, context);
}
export function slhDsaShake_256sSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_shake_256s_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(29792, WebBuf.fromUint8Array(out));
}
export function slhDsaShake_256sVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_shake_256s_verify_internal(verifyingKey.buf, message, signature.buf);
}
export function slhDsaShake_256fKeyPair(skSeed, skPrf, pkSeed) {
    const seeds = requireAllSeeds("slhDsaShake_256fKeyPair", 32, skSeed, skPrf, pkSeed);
    return slhDsaShake_256fKeyPairDeterministic(...seeds);
}
export function slhDsaShake_256fKeyPairDeterministic(skSeed, skPrf, pkSeed) {
    const out = slh_dsa_shake_256f_keypair(skSeed.buf, skPrf.buf, pkSeed.buf);
    return splitKeypair(out, 64, 128);
}
export function slhDsaShake_256fSign(signingKey, message, context) {
    return slhSignHedged(slh_dsa_shake_256f_sign, 49856, 32, signingKey, message, context);
}
export function slhDsaShake_256fSignDeterministic(signingKey, message, context) {
    return slhSignDeterministic(slh_dsa_shake_256f_sign, 49856, signingKey, message, context);
}
export function slhDsaShake_256fVerify(verifyingKey, message, signature, context) {
    return slhVerify(slh_dsa_shake_256f_verify, verifyingKey, message, signature, context);
}
export function slhDsaShake_256fSignInternal(signingKey, message, addrnd) {
    const out = slh_dsa_shake_256f_sign_internal(signingKey.buf, message, addrnd ? addrnd.buf : EMPTY_OPT_RAND);
    return FixedBuf.fromBuf(49856, WebBuf.fromUint8Array(out));
}
export function slhDsaShake_256fVerifyInternal(verifyingKey, message, signature) {
    return slh_dsa_shake_256f_verify_internal(verifyingKey.buf, message, signature.buf);
}
