From 229cb20f6827ac51654a3b1a9ad0d0e9d140a913 Mon Sep 17 00:00:00 2001 From: FermeLeLundi Date: Thu, 28 Nov 2024 10:34:08 +0000 Subject: [PATCH] Update modules/keying/keying.go Typo --- modules/keying/keying.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/keying/keying.go b/modules/keying/keying.go index d7dfe0763c..ff3805c14f 100644 --- a/modules/keying/keying.go +++ b/modules/keying/keying.go @@ -1,8 +1,8 @@ // Copyright 2024 The Forgejo Authors. All rights reserved. // SPDX-License-Identifier: MIT -// Keying is a module that allows for subkeys to be determistically generated -// from the same master key. It allows for domain seperation to take place by +// Keying is a module that allows for subkeys to be deterministically generated +// from the same master key. It allows for domain separation to take place by // using new keys for new subsystems/domains. These subkeys are provided with // an API to encrypt and decrypt data. The module panics if a bad interaction // happened, the panic should be seen as an non-recoverable error. @@ -52,8 +52,8 @@ var ( ContextTOTP Context = "totp" ) -// Derive *the* key for a given context, this is a determistic function. The -// same key will be provided for the same context. +// Derive *the* key for a given context, this is a deterministic function. +// The same key will be provided for the same context. func DeriveKey(context Context) *Key { if len(prk) == 0 { panic("keying: not initialized") @@ -77,7 +77,7 @@ type Key struct { // Encrypts the specified plaintext with some additional data that is tied to // this plaintext. The additional data can be seen as the context in which the // data is being encrypted for, this is different than the context for which the -// key was derrived this allows for more granuality without deriving new keys. +// key was derived; this allows for more granularity without deriving new keys. // Avoid any user-generated data to be passed into the additional data. The most // common usage of this would be to encrypt a database field, in that case use // the ID and database column name as additional data. The additional data isn't