Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
crypto /
cipher /
[ HOME SHELL ]
Name
Size
Permission
Action
benchmark_test.go
3.46
KB
-rw-r--r--
cbc.go
4.42
KB
-rw-r--r--
cbc_aes_test.go
2.93
KB
-rw-r--r--
cfb.go
1.94
KB
-rw-r--r--
cfb_test.go
2.77
KB
-rw-r--r--
cipher.go
2.49
KB
-rw-r--r--
cipher_test.go
2.2
KB
-rw-r--r--
common_test.go
1.24
KB
-rw-r--r--
ctr.go
2.12
KB
-rw-r--r--
ctr_aes_test.go
2.98
KB
-rw-r--r--
ctr_test.go
1.13
KB
-rw-r--r--
example_test.go
11.78
KB
-rw-r--r--
export_test.go
242
B
-rw-r--r--
gcm.go
13.82
KB
-rw-r--r--
gcm_test.go
21.3
KB
-rw-r--r--
io.go
1.46
KB
-rw-r--r--
ofb.go
1.6
KB
-rw-r--r--
ofb_test.go
2.95
KB
-rw-r--r--
xor_amd64.go
642
B
-rw-r--r--
xor_amd64.s
1.31
KB
-rw-r--r--
xor_generic.go
2.33
KB
-rw-r--r--
xor_ppc64x.go
641
B
-rw-r--r--
xor_ppc64x.s
2.03
KB
-rw-r--r--
xor_test.go
1.6
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cipher_test.go
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package cipher_test import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/des" "testing" ) func TestCryptBlocks(t *testing.T) { buf := make([]byte, 16) block, _ := aes.NewCipher(buf) mode := cipher.NewCBCDecrypter(block, buf) mustPanic(t, "crypto/cipher: input not full blocks", func() { mode.CryptBlocks(buf, buf[:3]) }) mustPanic(t, "crypto/cipher: output smaller than input", func() { mode.CryptBlocks(buf[:3], buf) }) mode = cipher.NewCBCEncrypter(block, buf) mustPanic(t, "crypto/cipher: input not full blocks", func() { mode.CryptBlocks(buf, buf[:3]) }) mustPanic(t, "crypto/cipher: output smaller than input", func() { mode.CryptBlocks(buf[:3], buf) }) } func mustPanic(t *testing.T, msg string, f func()) { defer func() { err := recover() if err == nil { t.Errorf("function did not panic, wanted %q", msg) } else if err != msg { t.Errorf("got panic %v, wanted %q", err, msg) } }() f() } func TestEmptyPlaintext(t *testing.T) { var key [16]byte a, err := aes.NewCipher(key[:16]) if err != nil { t.Fatal(err) } d, err := des.NewCipher(key[:8]) if err != nil { t.Fatal(err) } s := 16 pt := make([]byte, s) ct := make([]byte, s) for i := 0; i < 16; i++ { pt[i], ct[i] = byte(i), byte(i) } assertEqual := func(name string, got, want []byte) { if !bytes.Equal(got, want) { t.Fatalf("%s: got %v, want %v", name, got, want) } } for _, b := range []cipher.Block{a, d} { iv := make([]byte, b.BlockSize()) cbce := cipher.NewCBCEncrypter(b, iv) cbce.CryptBlocks(ct, pt[:0]) assertEqual("CBC encrypt", ct, pt) cbcd := cipher.NewCBCDecrypter(b, iv) cbcd.CryptBlocks(ct, pt[:0]) assertEqual("CBC decrypt", ct, pt) cfbe := cipher.NewCFBEncrypter(b, iv) cfbe.XORKeyStream(ct, pt[:0]) assertEqual("CFB encrypt", ct, pt) cfbd := cipher.NewCFBDecrypter(b, iv) cfbd.XORKeyStream(ct, pt[:0]) assertEqual("CFB decrypt", ct, pt) ctr := cipher.NewCTR(b, iv) ctr.XORKeyStream(ct, pt[:0]) assertEqual("CTR", ct, pt) ofb := cipher.NewOFB(b, iv) ofb.XORKeyStream(ct, pt[:0]) assertEqual("OFB", ct, pt) } }
Close