mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-22 02:30:09 +02:00
chore(deps): update go-git/go-git, ProtonMail/go-cryto, and cloudflare/circl deps (#2959)
This commit is contained in:
+3
-1
@@ -73,7 +73,9 @@ func (c *x448) GenerateECDH(rand io.Reader) (point []byte, secret []byte, err er
|
||||
func (c *x448) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
|
||||
var pk, ss x448lib.Key
|
||||
seed, e, err := c.generateKeyPairBytes(rand)
|
||||
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
copy(pk[:], point)
|
||||
x448lib.Shared(&ss, &seed, &pk)
|
||||
|
||||
|
||||
+4
-4
@@ -1313,17 +1313,17 @@ func (dmp *DiffMatchPatch) diffLinesToStrings(text1, text2 string) (string, stri
|
||||
// '\x00' is a valid character, but various debuggers don't like it. So we'll insert a junk entry to avoid generating a null character.
|
||||
lineArray := []string{""} // e.g. lineArray[4] == 'Hello\n'
|
||||
|
||||
lineHash := make(map[string]int)
|
||||
//Each string has the index of lineArray which it points to
|
||||
strIndexArray1 := dmp.diffLinesToStringsMunge(text1, &lineArray)
|
||||
strIndexArray2 := dmp.diffLinesToStringsMunge(text2, &lineArray)
|
||||
strIndexArray1 := dmp.diffLinesToStringsMunge(text1, &lineArray, lineHash)
|
||||
strIndexArray2 := dmp.diffLinesToStringsMunge(text2, &lineArray, lineHash)
|
||||
|
||||
return intArrayToString(strIndexArray1), intArrayToString(strIndexArray2), lineArray
|
||||
}
|
||||
|
||||
// diffLinesToStringsMunge splits a text into an array of strings, and reduces the texts to a []string.
|
||||
func (dmp *DiffMatchPatch) diffLinesToStringsMunge(text string, lineArray *[]string) []uint32 {
|
||||
func (dmp *DiffMatchPatch) diffLinesToStringsMunge(text string, lineArray *[]string, lineHash map[string]int) []uint32 {
|
||||
// Walk the text, pulling out a substring for each line. text.split('\n') would would temporarily double our memory footprint. Modifying text would create many large strings to garbage collect.
|
||||
lineHash := map[string]int{} // e.g. lineHash['Hello\n'] == 4
|
||||
lineStart := 0
|
||||
lineEnd := -1
|
||||
strs := []uint32{}
|
||||
|
||||
Reference in New Issue
Block a user