Skip to content

Commit f70d621

Browse files
authored
Merge branch 'google:master' into fix_207
2 parents df3ec2a + 8725f01 commit f70d621

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Cross-Platform Web Cryptography Implemenation
1+
Cross-Platform Web Cryptography Implementation
22
=============================================
33
This package provides a cross-platform implementation of the
44
[Web Cryptograph API][webcrypto-spec].

doc/design-rationale.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cryptography implementation. This option comes with significant draw backs:
2424
* Custom implementations of cryptographic algorithms requires domain experts
2525
and extensive security reviews.
2626
* A Javascript implementation is unlikely to achieve performance comparable to
27-
the native crytography algorithms shipped with the browser.
27+
the native cryptography algorithms shipped with the browser.
2828
* A Javascript implementation would need to use WebWorker to off-load
2929
computation from the main-thread, while the browsers native implementation
3030
can do this for free.
@@ -38,7 +38,7 @@ for golang, this package will not provide low-level access to underlying
3838
primitives. However, most Dart developers are also unlikely to need such
3939
advanced features for using a modern Web API.
4040

41-
Crytography is not simple, and should not be simplfied
41+
Cryptography is not simple, and should not be simplified
4242
------------------------------------------------------
4343
This isn't entirely true of course, cryptography isn't so hard _if_ you know
4444
what you're doing. If you don't know what you're doing, then you shouldn't be
@@ -74,7 +74,7 @@ This does not follow `package:crypto` by implementing `Converter<S,T>`
7474
because `convert()` cannot be asynchronous as required by WebCrypto.
7575

7676
Besides users (hint Flutter) would likely prefer to avoid heavy computations
77-
like crypto on the main-thread. Even if an initial implemention doesn't move
77+
like crypto on the main-thread. Even if an initial implementation doesn't move
7878
computation off-the-mainthread, it would be preferable to keep the option open
7979
by returning futures.
8080

doc/webcrypto-parity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ developers to harden their applications against accidental misuse of keys.
3333

3434
If we wanted to support this feature we would introduce a `KeyUsages` enum, and
3535
allow all key import and generation methods to accept a set of usages, as well
36-
as an `extractable` bit. Various key opertions would then throw
36+
as an `extractable` bit. Various key operations would then throw
3737
`UnsupportedError` if the key capabilities is violated.
3838

3939
This is not an unreasonable API design. However, this feature can also be
@@ -102,7 +102,7 @@ This also equivalent to decrypting the key and then importing the key.
102102

103103
Similar to `deriveKey` this is useful when limiting a key to specific usages to
104104
prevent a key from accidentally being misused. If we wanted to support this
105-
feature we would also be introducing intermediate objets similar to the design
105+
feature we would also be introducing intermediate objects similar to the design
106106
outlined for `deriveKey`. Instead these would be `WrapKeyOptions` and
107107
`UnwrapKeyOptions<T>`, and keys that can be wrapped would have methods for
108108
creating these options with different encapsulated key-formats.

lib/src/impl_ffi/impl_ffi.rsa_common.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ _EvpPKey _importJwkRsaPrivateOrPublicKey(
115115
checkJwk(jwk.d != null, 'd');
116116
final d = readBN(jwk.d!, 'd');
117117
// If present properties p,q,dp,dq,qi enable optional optimizations, see:
118-
// https://tools.ietf.org/html/rfc7518#section-6.3.2
118+
// https://www.rfc-editor.org/rfc/rfc7518#section-6.3.2
119119
// However, these are required by Chromes Web Crypto implementation:
120120
// https://chromium.googlesource.com/chromium/src/+/43d62c50b705f88c67b14539e91fd8fd017f70c4/components/webcrypto/algorithms/rsa.cc#82
121121
// They are also required by Web Crypto implementation in Firefox:
@@ -202,7 +202,7 @@ Map<String, dynamic> _exportJwkRsaPrivateOrPublicKey(
202202
ssl.RSA_get0_key(rsa, ffi.nullptr, ffi.nullptr, d);
203203

204204
// p, q, dp, dq, qi is optional in:
205-
// // https://tools.ietf.org/html/rfc7518#section-6.3.2
205+
// // https://www.rfc-editor.org/rfc/rfc7518#section-6.3.2
206206
// but explicitly required when exporting in Web Crypto.
207207
final p = scope<ffi.Pointer<BIGNUM>>();
208208
final q = scope<ffi.Pointer<BIGNUM>>();

lib/src/impl_ffi/impl_ffi.utils.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ int _numBitsToBytes(int numberOfBits) =>
489489
(numberOfBits ~/ 8) + ((7 + (numberOfBits % 8)) ~/ 8);
490490

491491
/// Decode url-safe base64 witout padding as specified in
492-
/// [RFC 7515 Section 2](https://tools.ietf.org/html/rfc7515#section-2)
492+
/// [RFC 7515 Section 2](https://www.rfc-editor.org/rfc/rfc7515#section-2)
493493
///
494494
/// Throw [FormatException] mentioning JWK property [prop] on failure.
495495
Uint8List _jwkDecodeBase64UrlNoPadding(String unpadded, String prop) {
@@ -508,7 +508,7 @@ Uint8List _jwkDecodeBase64UrlNoPadding(String unpadded, String prop) {
508508
}
509509

510510
/// Encode url-safe base64 witout padding as specified in
511-
/// [RFC 7515 Section 2](https://tools.ietf.org/html/rfc7515#section-2)
511+
/// [RFC 7515 Section 2](https://www.rfc-editor.org/rfc/rfc7515#section-2)
512512
String _jwkEncodeBase64UrlNoPadding(List<int> data) {
513513
final padded = base64Url.encode(data);
514514
final i = padded.indexOf('=');

lib/src/jsonwebkey.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ final class JsonWebKey {
216216
/// See also "oth" in [RFC 7518 Section 6.3.2.7].
217217
///
218218
/// [1]: https://www.w3.org/TR/WebCryptoAPI/#JsonWebKey-dictionary
219-
/// [2]: https://tools.ietf.org/html/rfc7518#section-6.3.2.7
219+
/// [2]: https://www.rfc-editor.org/rfc/rfc7518#section-6.3.2.7
220220
final class RsaOtherPrimesInfo {
221221
String r;
222222
String d;

lib/src/testing/webcrypto/rsapss.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ final _testData = [
125125
/// [2]: https://opensource.apple.com/source/CommonCrypto/CommonCrypto-60165.120.1/lib/CommonRSACryptor.c.auto.html
126126
/// [3]: https://opensource.apple.com/source/xnu/xnu-4570.41.2/EXTERNAL_HEADERS/corecrypto/ccrsa.h.auto.html
127127
/// [4]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf
128-
/// [5]: https://tools.ietf.org/html/rfc3447
128+
/// [5]: https://www.rfc-editor.org/rfc/rfc3447
129129
/// [6]: https://tools.ietf.org/html/rfc3447#section-9.1
130130
/// [7]: https://bugs.webkit.org/show_bug.cgi?id=216750
131131
...(nullOnSafari(_testDataWithLongSaltLength) ?? <Map>[]),

src/symbols.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# or OpenSSL that might be linked into the final application, because we only
2525
# expose the `webcrypto_lookup_symbol` symbol.
2626
#
27-
# On most platforms, like Android, the the BoringSSL sources and `webcrypto.c`
27+
# On most platforms, like Android, the BoringSSL sources and `webcrypto.c`
2828
# is compiled to a dynamic library `webcrypto.so`, in this case symbol conflicts
2929
# is unlikely (if loaded correctly).
3030
#

0 commit comments

Comments
 (0)