SHA256
cripto utils
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
const encoder = new TextEncoder();
|
const encoder = new TextEncoder();
|
||||||
const WEB_CRYPTO_REQUIRED_MESSAGE = 'Регистрация и подпись блоков требуют WebCrypto (crypto.subtle). Откройте приложение через HTTPS или localhost в современном браузере и повторите попытку.';
|
const WEB_CRYPTO_REQUIRED_MESSAGE = 'Регистрация и подпись блоков требуют WebCrypto (crypto.subtle). Откройте приложение через HTTPS или localhost в современном браузере и повторите попытку.';
|
||||||
import { argon2idAsync } from 'https://esm.sh/@noble/hashes@1.8.0/argon2.js';
|
import { argon2idAsync } from '../vendor/noble/hashes-argon2-1.8.0.bundle.mjs';
|
||||||
import { edwardsToMontgomeryPriv, edwardsToMontgomeryPub, x25519 } from 'https://esm.sh/@noble/curves@1.8.1/ed25519';
|
import { edwardsToMontgomeryPriv, edwardsToMontgomeryPub, x25519 } from '../vendor/noble/curves-ed25519-1.8.1.bundle.mjs';
|
||||||
const SHINE_KEY_DERIVATION_PREFIX = 'SHiNE-key';
|
const SHINE_KEY_DERIVATION_PREFIX = 'SHiNE-key';
|
||||||
|
|
||||||
function getCryptoApi() {
|
function getCryptoApi() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
edwardsToMontgomeryPriv,
|
edwardsToMontgomeryPriv,
|
||||||
edwardsToMontgomeryPub,
|
edwardsToMontgomeryPub,
|
||||||
x25519,
|
x25519,
|
||||||
} from 'https://esm.sh/@noble/curves@1.5.0/ed25519';
|
} from '../vendor/noble/curves-ed25519-1.5.0.bundle.mjs';
|
||||||
|
|
||||||
const PAIRING_ENVELOPE_PREFIX = 'shine-esp-pairing-v1:';
|
const PAIRING_ENVELOPE_PREFIX = 'shine-esp-pairing-v1:';
|
||||||
const PAIRING_HASH_PREFIX = 'sha256$';
|
const PAIRING_HASH_PREFIX = 'sha256$';
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user