Benign crates 6,020,134 installs Download

sp-keystore 0.48.0

“Keystore primitives.”

Large registry install base (10k+ downloads)Rust test marker or harness
SHA-2567545b7de39dfe4aafd5ed111b8e7a93707b5461d934d30318d35ec7a0fd46927

Evidence

Source SPDX license identifier declaration lib.rs · lines 1–10
1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE …
imports sp_core::crypto::ByteArray lib.rs · lines 27–42
27:3… cfg(feature = "bandersnatch-experimental")]
28use sp_core::bandersnatch;
29#[cfg(feature = "bls-experimental")]
30use sp_core::{bls381, ecdsa_bls381};
31use sp_core::{
32 crypto::{ByteArray, CryptoTypeId, KeyTypeId},
33 ecdsa, ed25519, sr25519,
34};
35
36use alloc::{string::String, sync::Arc, vec::Vec};
37
38/// Keystore error
⋯4 lines
imports codec::Encode lib.rs · lines 410–416
410:12… ],
411 ) -> Result<Option<Vec<u8>>, Error> {
412 use codec::Encode;
413
414 let signature = match crypto_id {
415 sr25519::CRYPTO_ID => {
416 let public = sr25519::Publ …
imports sp_core::testing::ECDSA testing.rs · lines 409–427
⋯4 lines
413}
414
415#[cfg(test)]
416mod tests {
417 use super::*;
418 use sp_core::{
419 sr25519,
420 testing::{ECDSA, ED25519, SR25519},
421 };
422
423 #[test]
424 fn store_key_and_extract() {
425 let store = MemoryKeystore::new();
426
427 let public = store.ed25519_generate_new(ED25519, None).ex …
assert! macro testing.rs · lines 429–436
429:11… ic_keys = store.ed25519_public_keys(ED25519);
430
431 assert!(public_keys.contains(&public.into()));
432 }
433
434 #[test]
435 fn store_unknown_and_extract_it() {
436 let …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.