diff options
author | Yiyu Lin <linyiyu1992@gmail.com> | 2023-01-13 15:51:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 16:51:32 +0900 |
commit | a00e432297d2ae119c8e1097aec74badc886f912 (patch) | |
tree | 7380b37245e889e97a8c7b1535a1e31fddb74738 /ext/crypto | |
parent | 5707a958ac2b44d573d50260b1d0d40887662011 (diff) |
chore: add `copyright_checker` tool and add the missing copyright (#17285)
Diffstat (limited to 'ext/crypto')
-rw-r--r-- | ext/crypto/decrypt.rs | 5 | ||||
-rw-r--r-- | ext/crypto/ed25519.rs | 2 | ||||
-rw-r--r-- | ext/crypto/encrypt.rs | 4 | ||||
-rw-r--r-- | ext/crypto/export_key.rs | 5 | ||||
-rw-r--r-- | ext/crypto/generate_key.rs | 5 | ||||
-rw-r--r-- | ext/crypto/import_key.rs | 7 | ||||
-rw-r--r-- | ext/crypto/shared.rs | 2 | ||||
-rw-r--r-- | ext/crypto/x25519.rs | 2 |
8 files changed, 26 insertions, 6 deletions
diff --git a/ext/crypto/decrypt.rs b/ext/crypto/decrypt.rs index c83ff55bd..6c4d5b6ba 100644 --- a/ext/crypto/decrypt.rs +++ b/ext/crypto/decrypt.rs @@ -1,4 +1,5 @@ -use crate::shared::*; +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + use aes::cipher::block_padding::Pkcs7; use aes::cipher::BlockDecryptMut; use aes::cipher::KeyIvInit; @@ -29,6 +30,8 @@ use sha2::Sha256; use sha2::Sha384; use sha2::Sha512; +use crate::shared::*; + #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct DecryptOptions { diff --git a/ext/crypto/ed25519.rs b/ext/crypto/ed25519.rs index b7ff99d8b..898366bbc 100644 --- a/ext/crypto/ed25519.rs +++ b/ext/crypto/ed25519.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + use deno_core::error::AnyError; use deno_core::op; use deno_core::ZeroCopyBuf; diff --git a/ext/crypto/encrypt.rs b/ext/crypto/encrypt.rs index 9420acdbd..f34e0cbc6 100644 --- a/ext/crypto/encrypt.rs +++ b/ext/crypto/encrypt.rs @@ -1,4 +1,4 @@ -use crate::shared::*; +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. use aes::cipher::block_padding::Pkcs7; use aes::cipher::BlockEncryptMut; @@ -31,6 +31,8 @@ use sha2::Sha256; use sha2::Sha384; use sha2::Sha512; +use crate::shared::*; + #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct EncryptOptions { diff --git a/ext/crypto/export_key.rs b/ext/crypto/export_key.rs index 0cbb2f676..ec76bac92 100644 --- a/ext/crypto/export_key.rs +++ b/ext/crypto/export_key.rs @@ -1,4 +1,5 @@ -use crate::shared::*; +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + use const_oid::AssociatedOid; use const_oid::ObjectIdentifier; use deno_core::error::custom_error; @@ -15,6 +16,8 @@ use spki::der::Decode; use spki::der::Encode; use spki::AlgorithmIdentifier; +use crate::shared::*; + #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExportKeyOptions { diff --git a/ext/crypto/generate_key.rs b/ext/crypto/generate_key.rs index 9ecbb8d11..2a9452c43 100644 --- a/ext/crypto/generate_key.rs +++ b/ext/crypto/generate_key.rs @@ -1,4 +1,5 @@ -use crate::shared::*; +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + use deno_core::error::AnyError; use deno_core::op; use deno_core::ZeroCopyBuf; @@ -12,6 +13,8 @@ use rsa::BigUint; use rsa::RsaPrivateKey; use serde::Deserialize; +use crate::shared::*; + // Allowlist for RSA public exponents. static PUB_EXPONENT_1: Lazy<BigUint> = Lazy::new(|| BigUint::from_u64(3).unwrap()); diff --git a/ext/crypto/import_key.rs b/ext/crypto/import_key.rs index 07c7f3f6f..42eab0e6c 100644 --- a/ext/crypto/import_key.rs +++ b/ext/crypto/import_key.rs @@ -1,5 +1,5 @@ -use crate::key::CryptoNamedCurve; -use crate::shared::*; +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + use deno_core::error::AnyError; use deno_core::op; use deno_core::ZeroCopyBuf; @@ -12,6 +12,9 @@ use serde::Serialize; use spki::der::Decode; use spki::der::Encode; +use crate::key::CryptoNamedCurve; +use crate::shared::*; + #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub enum KeyData { diff --git a/ext/crypto/shared.rs b/ext/crypto/shared.rs index d2f7d53e8..4ecb35dc2 100644 --- a/ext/crypto/shared.rs +++ b/ext/crypto/shared.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + use std::borrow::Cow; use deno_core::error::custom_error; diff --git a/ext/crypto/x25519.rs b/ext/crypto/x25519.rs index 1e64e9909..0ecdf4ddc 100644 --- a/ext/crypto/x25519.rs +++ b/ext/crypto/x25519.rs @@ -1,3 +1,5 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. + use curve25519_dalek::montgomery::MontgomeryPoint; use deno_core::error::AnyError; use deno_core::op; |