Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pal_crypto_webworker.h « System.Security.Cryptography.Native.Browser « libs « native « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c0b598edb0d9e10a8de8feca8c25ccc11c729eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma once

#include <stdint.h>

// These values are also defined in the System.Security.Cryptography library's
// browser-crypto implementation, and utilized in the dotnet-crypto-worker in the wasm runtime.
enum simple_digest
{
    sd_sha_1,
    sd_sha_256,
    sd_sha_384,
    sd_sha_512,
};

PALEXPORT int32_t SystemCryptoNativeBrowser_SimpleDigestHash(
    enum simple_digest ver,
    uint8_t* input_buffer,
    int32_t input_len,
    uint8_t* output_buffer,
    int32_t output_len);

PALEXPORT int32_t SystemCryptoNativeBrowser_Sign(
    enum simple_digest ver,
    uint8_t* key_buffer,
    int32_t key_len,
    uint8_t* input_buffer,
    int32_t input_len,
    uint8_t* output_buffer,
    int32_t output_len);

PALEXPORT int32_t SystemCryptoNativeBrowser_CanUseSubtleCryptoImpl(void);