Documentation - Typos & Consistency Fixes (#186)

This commit is contained in:
Joey authored and GitHub committed 2023-06-29 02:20:15 -07:00
1 parent c433cd3341
commit cba358dec9
4 files changed
+7 -7

No files matched your search

@@ -16,8 +16,8 @@
#else
import Foundation
/// A protocol that represents any internal object that can present itself as a INTEGER, or be parsed from
/// a INTEGER.
/// A protocol that represents any internal object that can present itself as an INTEGER, or be parsed from
/// an INTEGER.
///
/// This is not a very good solution for a fully-fledged ASN.1 library: we'd rather have a better numerics
/// protocol that could both initialize from and serialize to either bytes or words. However, no such
+1 -1
View File
@@ -36,7 +36,7 @@ public protocol DiffieHellmanKeyAgreement {
/// Generate a shared secret by calling your private key’s
/// `sharedSecretFromKeyAgreement(publicKeyShare:)` method with the public key
/// from another party. The other party computes the same secret by passing your
/// public key to the the equivalent method on their own private key.
/// public key to the equivalent method on their own private key.
///
/// The shared secret isn’t suitable as a symmetric cryptographic key
/// (``SymmetricKey``) by itself. However, you use it to generate a key by
+3 -3
View File
@@ -58,9 +58,9 @@ extension AES.GCM {
/// - sealedBox: The sealed box to authenticate and decrypt
/// - key: An encryption key of 128 or 256 bits
/// - nonce: An Nonce for AES-GCM-SIV encryption. The nonce must be unique for every use of the key to seal data. It can be safely generated with AES.GCM.Nonce().
/// - authenticatedData: Data that was authenticated as part of the seal
/// - authenticatedData: Data that was authenticated as part of the seal
/// - Returns: The ciphertext if opening was successful
/// - Throws: CipherError errors. If the authentication of the sealedbox failed, incorrectTag is thrown.
/// - Throws: CipherError errors. If the authentication of the sealed box failed, incorrectTag is thrown.
public static func open<AuthenticatedData: DataProtocol>
(_ sealedBox: SealedBox, using key: SymmetricKey, authenticating authenticatedData: AuthenticatedData) throws -> Data {
return try OpenSSLAESGCMSIVImpl.open(key: key, sealedBox: sealedBox, authenticatedData: authenticatedData)
@@ -73,7 +73,7 @@ extension AES.GCM {
/// - key: An encryption key of 128 or 256 bits
/// - nonce: An Nonce for AES-GCM-SIV encryption. The nonce must be unique for every use of the key to seal data. It can be safely generated with AES.GCM.Nonce().
/// - Returns: The ciphertext if opening was successful
/// - Throws: CipherError errors. If the authentication of the sealedbox failed, incorrectTag is thrown.
/// - Throws: CipherError errors. If the authentication of the sealed box failed, incorrectTag is thrown.
public static func open(_ sealedBox: SealedBox, using key: SymmetricKey) throws -> Data {
return try OpenSSLAESGCMSIVImpl.open(key: key, sealedBox: sealedBox, authenticatedData: Data?.none)
}
+1 -1
View File
@@ -220,7 +220,7 @@ extension _RSA.Signing.PrivateKey {
return try self.signature(for: SHA256.hash(data: data), padding: .PSS)
}
/// Generates an RSA signature with the given key.
/// Generates an RSA signature with the given key.
///
/// - Parameter digest: The digest to sign.
/// - Parameter padding: The padding to use.