DoxigAlpha

Source

Implementation

#
pub fn Hash(comptime algorithm: Algorithm) type {
    return switch (algorithm) {
        .sha1WithRSAEncryption => crypto.hash.Sha1,
        .ecdsa_with_SHA224, .sha224WithRSAEncryption => crypto.hash.sha2.Sha224,
        .ecdsa_with_SHA256, .sha256WithRSAEncryption => crypto.hash.sha2.Sha256,
        .ecdsa_with_SHA384, .sha384WithRSAEncryption => crypto.hash.sha2.Sha384,
        .ecdsa_with_SHA512, .sha512WithRSAEncryption, .curveEd25519 => crypto.hash.sha2.Sha512,
        .md2WithRSAEncryption => @compileError("unimplemented"),
        .md5WithRSAEncryption => crypto.hash.Md5,
    };
}