Skip to content

Commit

Permalink
update license year on headers, use smaller blocks
Browse files Browse the repository at this point in the history
and check for zeros of output
  • Loading branch information
jpbland1 committed Nov 12, 2024
1 parent d33b278 commit 2c78a09
Show file tree
Hide file tree
Showing 40 changed files with 54 additions and 43 deletions.
2 changes: 1 addition & 1 deletion addon/wolfcrypt/ecc.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ecc.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/evp.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* evp.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/ecc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ecc.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/evp.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* evp.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/hmac.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* hmac.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/pbkdf2.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pbkdf2.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/pkcs12.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pkcs12.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/pkcs7.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pkcs7.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/random.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* random.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/rsa.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* rsa.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/h/sha.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* sha.h
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/hmac.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* hmac.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* main.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/pbkdf2.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pbkdf2.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/pkcs12.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pkcs12.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/pkcs7.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pkcs7.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/random.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* random.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/rsa.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* rsa.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion addon/wolfcrypt/sha.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* sha.cpp
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* index.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/ecc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ecc.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/evp.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* evp.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/hmac.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* hmac.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/pbkdf2.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pbkdf2.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/pkcs12.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pkcs12.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/pkcs7.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pkcs7.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/random.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* random.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/rsa.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* rsa.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion interfaces/sha.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* sha.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* test.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/ecc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ecc.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/evp.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* evp.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/hmac.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* hmac.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* index.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/pbkdf2.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pbkdf2.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/pkcs12.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/pkcs7.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* pkcs7.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
19 changes: 15 additions & 4 deletions tests/random.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* random.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand All @@ -25,15 +25,26 @@ const rng_tests =
generateBlock: async function()
{
let rng = new WolfSSLRandom()
let rngOne = rng.GenerateBlock(1000)
let rngTwo = rng.GenerateBlock(1000)
let rngOne = rng.GenerateBlock(256)
let rngTwo = rng.GenerateBlock(256)
rng.free()

if (rngOne.equals(rngTwo)) {
console.log('FAIL RNG generateBlock')
}
else {
console.log('PASS RNG generateBlock')
let i;
for (i = 0; i < rngOne.length; i++) {
if (rngOne[i] != 0) {
break
}
}
if (i >= rngOne.length) {
console.log('FAIL RNG generateBlock')
}
else {
console.log('PASS RNG generateBlock')
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/rsa.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* rsa.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/sha.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* sha.js
*
* Copyright (C) 2006-2022 wolfSSL Inc.
* Copyright (C) 2006-2024 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
Expand Down

0 comments on commit 2c78a09

Please sign in to comment.