$trim
+ $var
+ $data
+ $data
+ $data
+ $digit
+ $digit
+ $element
+ $format
+ $length
+ $element
+ $part[0]
+ $part[0]
+ $result[]
+ $result[]
+ $result[]
+ $result[]
+ $result[]
+ $result[]
+ $result[]
+ $format[$i]
+ $digit
+ $digit
+ $element
+ $i
+ $part
+ $result[]
+ $result[]
+ $temp
+ $temp
+ array
+ $i
+ $lower
+ $lower < 0 ? ($lower & 0x7FFFFFFFF) + 0x80000000 : $lower
+ $part
+ $temp['num']
+ $temp['num']
+ $upper
+ $result
+ $parts
+ pack('N', $temp['num'] + 1)
+ pack('N', $temp['num'] + 1)
+ unpack('Nupper/Nlower', self::shift($data, 8))
+ $digits
+ $digits
+ $parts
+ pack('C', $element)
+ pack('N', $element)
+ pack('NN', $element / 4294967296, $element)
+ pack('Na*', strlen($element), $element)
+ pack('Na*', strlen($element), $element)
+ pack('Na*', strlen($element), $element)
+ $length
+ $parts[$i - 1]
+ $parts[$i - 1]
+ $parts[$i - 1]
+ $parts[$i]
+ $temp
+ $temp['num']
+ $temp['num']
+ toBytes
+ $temp['num']
+ $temp['num']
+ string
+ $element instanceof BigInteger
+ $element instanceof FiniteField\Integer
+ AES
+ AES
+ AES
+ AES
+ AES
+ AES
+ AES
+ AES
+ AES
+ pack('N*', $r ^ $p[0], $l ^ $p[1])
+ pack('N*', $r ^ $p[17], $l ^ $p[16])
+ string
+ string
+ $j
+ $sb_0[$l >> 24 & 0xff] + $sb_1[$l >> 16 & 0xff]
+ $sb_0[$l >> 24 & 0xff] + $sb_1[$l >> 16 & 0xff]
+ $sb_0[$r >> 24 & 0xff] + $sb_1[$r >> 16 & 0xff]
+ $sb_0[$r >> 24 & 0xff] + $sb_1[$r >> 16 & 0xff]
+ $p[$i + 1]
+ $p[$i + 1]
+ $p[$i - 1]
+ $p[$i - 1]
+ $p[$i]
+ $p[$i]
+ $p[$i]
+ $p[$i]
+ $p[0]
+ $p[0]
+ $p[16]
+ $p[16]
+ $p[17]
+ $p[17]
+ $p[1]
+ $p[1]
+ $sb_0[$l >> 24 & 0xff]
+ $sb_0[$l >> 24 & 0xff]
+ $sb_0[$r >> 24 & 0xff]
+ $sb_0[$r >> 24 & 0xff]
+ $sb_1[$l >> 16 & 0xff]
+ $sb_1[$l >> 16 & 0xff]
+ $sb_1[$r >> 16 & 0xff]
+ $sb_1[$r >> 16 & 0xff]
+ $sb_2[$l >> 8 & 0xff]
+ $sb_2[$l >> 8 & 0xff]
+ $sb_2[$r >> 8 & 0xff]
+ $sb_2[$r >> 8 & 0xff]
+ $sb_3[$l & 0xff]
+ $sb_3[$l & 0xff]
+ $sb_3[$r & 0xff]
+ $sb_3[$r & 0xff]
+ $this->bctx['sb'][0]
+ $this->bctx['sb'][0]
+ $this->bctx['sb'][1]
+ $this->bctx['sb'][1]
+ $this->bctx['sb'][2]
+ $this->bctx['sb'][2]
+ $this->bctx['sb'][3]
+ $this->bctx['sb'][3]
+ $sb_0[$l >> 24 & 0xff]
+ $sb_0[$l >> 24 & 0xff]
+ $sb_0[$r >> 24 & 0xff]
+ $sb_0[$r >> 24 & 0xff]
+ $sb_1[$l >> 16 & 0xff]
+ $sb_1[$l >> 16 & 0xff]
+ $sb_1[$r >> 16 & 0xff]
+ $sb_1[$r >> 16 & 0xff]
+ $sb_2[$l >> 8 & 0xff]
+ $sb_2[$l >> 8 & 0xff]
+ $sb_2[$r >> 8 & 0xff]
+ $sb_2[$r >> 8 & 0xff]
+ $sb_3[$l & 0xff]
+ $sb_3[$l & 0xff]
+ $sb_3[$r & 0xff]
+ $sb_3[$r & 0xff]
+ $data
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $p
+ $p
+ $p
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $sb_0
+ $sb_0
+ $sb_1
+ $sb_1
+ $sb_2
+ $sb_2
+ $sb_3
+ $sb_3
+ $data
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $p[$i + 1]
+ $p[$i - 1]
+ $p[$i]
+ $p[$i]
+ $p[0]
+ $p[16]
+ $p[17]
+ $p[1]
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $sb_0[$l >> 24 & 0xff]
+ $sb_0[$l >> 24 & 0xff]
+ $sb_0[$r >> 24 & 0xff]
+ $sb_0[$r >> 24 & 0xff]
+ $sb_2[$l >> 8 & 0xff]
+ $sb_2[$l >> 8 & 0xff]
+ $sb_2[$r >> 8 & 0xff]
+ $sb_2[$r >> 8 & 0xff]
+ self::$parray[$i]
+ unpack('C*', $this->key)
+ unpack('N*', $data = $this->encryptBlock($data))
+ unpack('N*', $data = $this->encryptBlock($data))
+ $in[1]
+ $in[1]
+ $in[2]
+ $in[2]
+ $this->openssl_translate_mode()
+ $in[1]
+ $in[1]
+ $in[2]
+ $in[2]
+ $this->bctx['p']
+ $this->bctx['p']
+ $this->bctx['p']
+ $this->bctx['sb']
+ $this->bctx['sb']
+ setupInlineCrypt
+ $bctx
+ $kl
+ Blowfish
+ Blowfish
+ Blowfish
+ Blowfish
+ Blowfish
+ Blowfish
+ Blowfish
+ Blowfish
+ Blowfish
+ $this->key === false
+ $this->nonce === false
+ $this->oldtag === false
+ salsa20
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x0
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x12 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x1
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x13 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x2
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x14 ^ $x3
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x0
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x15 ^ $x3
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x8
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x4 ^ $x9
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x10
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x5 ^ $x9
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x10
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x6 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x11
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x7 ^ $x8
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x12
+ $x13
+ $x14
+ $x15
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x4
+ $x5
+ $x6
+ $x7
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $z0
+ $z1
+ $z10
+ $z11
+ $z12
+ $z13
+ $z14
+ $z15
+ $z2
+ $z3
+ $z4
+ $z5
+ $z6
+ $z7
+ $z8
+ $z9
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x0
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x1
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x10
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x11
+ $x12
+ $x13
+ $x14
+ $x15
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x2
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x3
+ $x4
+ $x5
+ $x6
+ $x7
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x8
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $x9
+ $z12
+ $z13
+ $z14
+ $z15
+ $z4
+ $z5
+ $z6
+ $z7
+ $ciphertext
+ $ciphertext
+ $ciphertext
+ $plaintext
+ false
+ false
+ false
+ $x0
+ $x1
+ $x10
+ $x11
+ $x12
+ $x13
+ $x14
+ $x15
+ $x2
+ $x3
+ $x4
+ $x5
+ $x6
+ $x7
+ $x8
+ $x9
+ ChaCha20
+ ChaCha20
+ ChaCha20
+ ChaCha20
+ ChaCha20
+ ChaCha20
+ ChaCha20
+ ChaCha20
+ ChaCha20
+ $this->usePoly1305 && !isset($this->poly1305Key)
+ $this->usePoly1305 && !isset($this->poly1305Key)
+ isset($this->poly1305Key)
+ is_string($nonce)
+ $this->format
+ $type
+ string
+ string
+ string
+ string
+ validatePlugin
+ $name
+ $rolen
+ $this->q
+ $this->q
+ $this->x
+ $type
+ $vlen - $qlen
+ -$rolen
+ self::$invisiblePlugins[static::ALGORITHM]
+ $components['comment']
+ self::$plugins[static::ALGORITHM]['Keys']
+ self::$plugins[static::ALGORITHM]['Keys']
+ $components['format']
+ $components['format']
+ self::$invisiblePlugins[static::ALGORITHM][]
+ self::$plugins[static::ALGORITHM][$format]
+ self::$plugins[static::ALGORITHM][$format]
+ self::$plugins[static::ALGORITHM]['Keys']
+ self::$invisiblePlugins[static::ALGORITHM]
+ self::$invisiblePlugins[static::ALGORITHM]
+ self::$invisiblePlugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ self::$plugins[static::ALGORITHM]
+ $comment
+ $components
+ $components
+ $components['format']
+ $components['format']
+ $format
+ $format
+ $new
+ $new
+ $qlen
+ $qlen
+ $rolen
+ $type
+ AsymmetricKey
+ array
+ static
+ $format::load($key, $password)
+ $format::load($key, $password)
+ getLength
+ getLengthInBytes
+ getLengthInBytes
+ $qlen
+ static::ALGORITHM
+ static::ALGORITHM
+ $new
+ $new
+ $new
+ self::$plugins[static::ALGORITHM]['Keys']
+ $key
+ $key
+ $format
+ $format
+ computek
+ getComment
+ getSupportedKeyFormats
+ loadParameters
+ loadParametersFormat
+ loadPrivateKey
+ loadPrivateKeyFormat
+ loadPublicKey
+ loadPublicKeyFormat
+ array
+ $format
+ isset(self::$zero)
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::ALGORITHM
+ static::onLoad($components)
+ static::onLoad($components)
+ $this->q
+ $this->q
+ $this->q
+ $this->q
+ $this->x
+ $name
+ $signatureFileFormats
+ $signatureFormats
+ $checkint
+ $checkint
+ $comment
+ $kdfoptions
+ $paddedKey
+ $publicKey
+ $type
+ $type
+ static::$types
+ static::$types
+ $comment
+ $asciiType
+ $parts[1]
+ $checkint
+ $key
+ $parts[0]
+ $parts[1]
+ setBinaryOutput
+ !empty($password) && is_string($password)
+ is_string($password)
+ $key
+ $key
+ static::$types
+ static::$types
+ requireAny
+ requireDER
+ requirePEM
+ !is_string($password)
+ self::getEncryptionMode($matches[1])
+ self::getEncryptionMode($matches[1])
+ self::getEncryptionMode($matches[2])
+ $mode
+ int
+ $encryptionAlgorithm
+ $encryptionAlgorithm
+ $password
+ $key
+ $matches[1]
+ $matches[1]
+ $matches[1]
+ $matches[1]
+ $matches[2]
+ $matches[2]
+ $decoded !== false
+ $ciphertext === false
+ $hash
+ $salt
+ $params
+ $params
+ $algorithm
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decrypted['encryptionAlgorithm']['parameters']
+ $decrypted['encryptionAlgorithm']['parameters']
+ $decrypted['encryptionAlgorithm']['parameters']
+ $encryptionAlgorithm
+ $encryptionScheme
+ $encryptionScheme['algorithm']
+ $encryptionScheme['parameters']
+ $iterationCount
+ $kdf['parameters']->element
+ $key
+ $key
+ $key
+ $key
+ $keyDerivationFunc['parameters']
+ $prf
+ $prf['algorithm']
+ $private['publicKey']
+ $private['publicKey'][0]
+ $public['publicKey']
+ $public['publicKey'][0]
+ $r['encryptionAlgorithm']['parameters']->element
+ $temp['length']
+ $temp['length']
+ $temp['start']
+ $temp['start']
+ $temp[0]
+ $temp[0]
+ $temp[0]
+ $temp[0]
+ $temp[0]
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_VALUE
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decrypted['encryptedData']
+ $decrypted['encryptedData']
+ $decrypted['encryptionAlgorithm']['algorithm']
+ $decrypted['encryptionAlgorithm']['parameters']
+ $decrypted['encryptionAlgorithm']['parameters']
+ $decrypted['encryptionAlgorithm']['parameters']
+ $encryptionScheme['algorithm']
+ $encryptionScheme['algorithm']
+ $encryptionScheme['parameters']
+ $encryptionScheme['parameters']
+ $kdf['algorithm']
+ $kdf['parameters']
+ $keyDerivationFunc['algorithm']
+ $keyDerivationFunc['algorithm']
+ $keyDerivationFunc['parameters']
+ $prf['algorithm']
+ $prf['algorithm']
+ $private['privateKeyAlgorithm']['algorithm']
+ $private['privateKeyAlgorithm']['algorithm']
+ $private['privateKeyAlgorithm']['algorithm']
+ $private['privateKeyAlgorithm']['algorithm']
+ $private['publicKey'][0]
+ $private['publicKey'][0]
+ $public['publicKey'][0]
+ $public['publicKeyAlgorithm']['algorithm']
+ $public['publicKeyAlgorithm']['algorithm']
+ $public['publicKeyAlgorithm']['algorithm']
+ $public['publicKeyAlgorithm']['algorithm']
+ $r['encryptionAlgorithm']['algorithm']
+ $r['encryptionAlgorithm']['parameters']
+ $temp['length']
+ $temp['length']
+ $temp['start']
+ $temp['start']
+ $kdf['parameters']
+ $meta['meta']
+ $meta['meta']
+ $meta['meta']
+ $r['encryptionAlgorithm']['parameters']
+ [static::OID_NAME => static::OID_VALUE]
+ $algorithm
+ $encryptionAlgorithm
+ $encryptionScheme
+ $iterationCount
+ $kdf
+ $key
+ $key
+ $key['privateKeyAlgorithm']['parameters']
+ $meta['meta']['algorithm']
+ $meta['meta']['cipher']
+ $meta['meta']['keyDerivationFunc']
+ $meta['meta']['prf']
+ $prf
+ $temp
+ $temp
+ array
+ array
+ decrypt
+ decrypt
+ setIV
+ setIV
+ setKeyLength
+ setPassword
+ setPassword
+ toString
+ toString
+ toString
+ toString
+ $meta
+ $private['privateKeyAlgorithm']['algorithm']
+ $private['privateKeyAlgorithm']['algorithm']
+ $public['publicKeyAlgorithm']['algorithm']
+ $public['publicKeyAlgorithm']['algorithm']
+ static::OID_NAME
+ static::OID_NAME
+ $kdf['parameters']->element
+ $r['encryptionAlgorithm']['parameters']->element
+ $private + $meta
+ $r['encryptionAlgorithm']
+ $key
+ $params
+ $temp
+ $temp
+ ASN1::asn1map($temp[0], Maps\PBEParameter::MAP)
+ ASN1::asn1map($temp[0], Maps\RC2CBCParameter::MAP)
+ $r['encryptionAlgorithm']['parameters']['keyDerivationFunc']
+ $r['encryptionAlgorithm']['parameters']['keyDerivationFunc']
+ $key
+ $kdf['parameters']->element
+ $kdf['algorithm']
+ $kdf['parameters']
+ $r['encryptionAlgorithm']['parameters']['keyDerivationFunc']
+ $kdf['parameters']->element
+ $r['encryptionAlgorithm']['parameters']
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $matches[1]
+ $matches[1]
+ $temp[0]
+ $temp[0]
+ $temp[0]
+ $temp[0]
+ $temp[0]
+ $decrypted['encryptionAlgorithm']
+ $private['privateKeyAlgorithm']
+ $private['privateKeyAlgorithm']
+ $private['privateKeyAlgorithm']
+ $private['privateKeyAlgorithm']
+ $public['publicKey']
+ $public['publicKey']
+ $public['publicKey']
+ $public['publicKeyAlgorithm']
+ $public['publicKeyAlgorithm']
+ $public['publicKeyAlgorithm']
+ $public['publicKeyAlgorithm']
+ $r['encryptionAlgorithm']
+ $r['encryptionAlgorithm']
+ $r['encryptionAlgorithm']
+ $r['encryptionAlgorithm']['parameters']['keyDerivationFunc']
+ $iv
+ $salt
+ setIterationCount
+ $decoded !== false
+ !empty($password) && is_string($password)
+ is_string($password)
+ Strings::is_stringable($key)
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_NAME
+ static::OID_VALUE
+ static::OID_VALUE
+ $r['encryptionAlgorithm']['parameters']
+ static::$childOIDsLoaded
+ $comment
+ $hash->hash($source)
+ $hash->hash($source)
+ $hashkey
+ $hashkey
+ $hashkey
+ $key
+ $key[$offset + $privateLength]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $length
+ $offset
+ $password
+ $password
+ $private
+ $private
+ $private
+ $public
+ $symiv
+ $symkey
+ array_slice($key, $offset, $privateLength)
+ array_slice($key, 4, $publicLength)
+ static::$types
+ static::$types
+ $key[$offset + $privateLength]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ static::$types[0]
+ $components['comment']
+ $components['private']
+ $components['public']
+ $key[$offset + $privateLength]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $key[$offset++]
+ $comment
+ $components
+ $components
+ $components['private']
+ $mac
+ $offset
+ $offset
+ $offset
+ $offset
+ $offset
+ $offset
+ $offset
+ $private
+ $private
+ $version
+ array|false
+ decrypt
+ disablePadding
+ disablePadding
+ encrypt
+ hash
+ hash
+ hash
+ setIV
+ setIV
+ setKey
+ setKey
+ $components
+ $hashkey
+ $key
+ $offset
+ $offset
+ $offset
+ $offset
+ $offset
+ $offset
+ $offset
+ $publicLength
+ $source
+ static::$types[0]
+ $components
+ $components
+ $key
+ $key
+ $lines
+ $lines
+ $password
+ $password
+ $temp
+ unpack('Nlength', Strings::shift($public, 4))
+ $password
+ $key[0]
+ $key[1]
+ $key[2]
+ $key[3]
+ $lines[0]
+ $lines[count($lines) - 1]
+ preg_replace('#Argon2-Memory: (\d+)#', '$1', $key[$offset++])
+ preg_replace('#Argon2-Parallelism: (\d+)#', '$1', $key[$offset++])
+ preg_replace('#Argon2-Passes: (\d+)#', '$1', $key[$offset++])
+ preg_replace('#Argon2-Salt: ([0-9a-f]+)#', '$1', $key[$offset++])
+ preg_replace('#Comment: (.+)#', '$1', $key[2])
+ preg_replace('#Encryption: (.+)#', '$1', $key[1])
+ preg_replace('#Key-Derivation: (.*)#', '$1', $key[$offset++])
+ preg_replace('#Private-Lines: (\d+)#', '$1', $key[$offset++])
+ preg_replace('#Private-MAC: (.+)#', '$1', $key[$offset + $privateLength])
+ preg_replace('#Public-Lines: (\d+)#', '$1', $key[3])
+ $key[1]
+ $key[2]
+ $key[3]
+ $match[1]
+ $match[2]
+ $match[2]
+ $values['comment']
+ $hash
+ $hash
+ $symiv
+ $symiv
+ $symkey
+ $symkey
+ setVersion
+ static::PUBLIC_HANDLER
+ static::$types
+ static::$types
+ $mac
+ compact('r', 's')
+ string
+ $sig['r']
+ $sig['r']
+ $sig['s']
+ $sig['s']
+ load
+ save
+ !is_array($sig)
+ !isset($sig['r']) || !isset($sig['s'])
+ $message
+ getPublicKey
+ sign
+ withPassword
+ $algorithm
+ $message
+ $signature
+ getFingerprint
+ verify
+ verify
+ \phpseclib3\Crypt\Common\StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ StreamCipher
+ !$this->h
+ !$this->h
+ $this->iv === false
+ $this->key === false
+ $this->newtag === false
+ $this->nonce === false
+ $this->oldtag === false
+ $ciphertext
+ $ciphertext
+ $ciphertext
+ $result
+ openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING)
+ openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING)
+ $func_args[0]
+ $xor[0]
+ $xor[0]
+ string
+ $inline('decrypt', $ciphertext)
+ $inline('encrypt', $plaintext)
+ $length >> 3
+ $x
+ int
+ string
+ setupKey
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $ciphertext
+ $dkLen
+ $dkLen
+ $dkLen
+ $dkLen
+ $dkLen >> 1
+ $dkLen >> 1
+ $i
+ $i
+ $i
+ $i
+ $i
+ $i
+ $i
+ $i
+ $i
+ $i
+ $i
+ $key
+ $key
+ $key
+ $key
+ $len
+ $len
+ $len
+ $len
+ $len - $len % $block_size
+ $len - $len % $block_size
+ $mcrypt_modes[$this->mode]
+ $mcrypt_modes[$this->mode]
+ $one
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $overflow
+ $overflow
+ $plaintext
+ $reverseMap[$engine]
+ $this->openssl_options
+ $this->openssl_options
+ -$overflow
+ -$overflow
+ -$overflow
+ -$overflow
+ -$overflow
+ -$overflow
+ -$overflow - $this->block_size
+ MCRYPT_MODE_ECB
+ $mcrypt_modes[$this->mode]
+ $mcrypt_modes[$this->mode]
+ $reverseMap[$engine]
+ $this->buffer['pos']
+ $ciphertext
+ $dkLen
+ $i
+ $i
+ $i
+ $i
+ $i
+ $i
+ $key_length
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $max
+ $max
+ $max
+ $max
+ $max
+ $max
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $orig_pos
+ $overflow
+ $overflow
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $size
+ $this->preferredEngine
+ int
+ string
+ string
+ string
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $dkLen
+ $dkLen
+ $key_length
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $len
+ $max
+ $max
+ $max
+ $max
+ $max
+ $max
+ $overflow
+ $overflow
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $pos
+ $this->key_length
+ $xor[0]
+ $xor[0]
+ -$overflow
+ $inline('decrypt', $ciphertext)
+ $inline('encrypt', $plaintext)
+ $plaintext
+ $this->key_length << 3
+ $this->paddable ? $this->unpad($plaintext) : $plaintext
+ $ciphertext
+ $ciphertext
+ $ciphertext
+ $ciphertext
+ $ciphertext
+ $encryptIV
+ $encrypted
+ $iv
+ $result
+ $this->ecb
+ openssl_decrypt($ciphertext, $this->cipher_name_openssl, $this->key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv)
+ openssl_decrypt(substr($ciphertext, 0, -$overflow), $this->cipher_name_openssl, $this->key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv)
+ openssl_encrypt($plaintext . str_repeat("\0", $block_size), $this->cipher_name_openssl, $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $encryptIV)
+ openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $block_size), $this->cipher_name_openssl, $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $encryptIV)
+ openssl_encrypt(substr($plaintext, 0, -$overflow) . str_repeat("\0", $this->block_size), $this->cipher_name_openssl, $this->key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv)
+ pack('N', $i++)
+ pack('N', 8 * strlen($str))
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '')
+ mcrypt_module_open($this->cipher_name_mcrypt, '', $mcrypt_modes[$this->mode], '')
+ mcrypt_module_open($this->cipher_name_mcrypt, '', MCRYPT_MODE_ECB, '')
+ $count
+ $count
+ $count
+ $dkLen
+ $dkLen
+ $dkLen
+ $dkLen
+ $salt
+ $salt
+ $reverseMap[$engine]
+ $salt
+ $salt
+ $salt
+ $salt
+ null
+ null
+ null
+ null
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['pos']
+ $buffer['pos']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $buffer['xor']
+ $this->debuffer['pos']
+ $this->enbuffer['enmcrypt_init']
+ $this->enbuffer['enmcrypt_init']
+ $this->enbuffer['pos']
+ $this->enbuffer['pos']
+ $key
+ $key
+ $key
+ $key
+ $plaintext
+ $plaintext
+ $plaintext
+ enablePadding
+ getMode
+ $cipher_code
+ bool
+ $cipher_name_mcrypt
+ $cipher_name_openssl
+ $cipher_name_openssl_ecb
+ $debuffer
+ $decryptIV
+ $demcrypt
+ $ecb
+ $enbuffer
+ $encryptIV
+ $engine
+ $enmcrypt
+ $h
+ $inline_crypt
+ $poly1305Key
+ $preferredEngine
+ $this->ecb
+ $this->ecb
+ $this->engine != self::ENGINE_MCRYPT && $this->enmcrypt
+ $this->enmcrypt
+ is_string($this->key)
+ strlen($password)
+ $this->usePoly1305 && !isset($this->poly1305Key)
+ $this->usePoly1305 && !isset($this->poly1305Key)
+ isset($this->enmcrypt)
+ isset($this->poly1305Key)
+ isset($this->poly1305Key)
+ isset($this->preferredEngine)
+ isset(self::$gcmField)
+ isset(self::$poly1305Field)
+ return $ciphertext;
+ MCRYPT_MODE_CBC
+ MCRYPT_MODE_CFB
+ MCRYPT_MODE_ECB
+ MCRYPT_MODE_ECB
+ MCRYPT_MODE_NOFB
+ MCRYPT_MODE_OFB
+ MCRYPT_MODE_STREAM
+ Callback
+ setupInlineCrypt
+ $this->h->key
+ $this->h->key
+ $this->key_length
+ $this->buffer
+ $this->key_length
+ $this->key_length
+ $this->openssl_options
+ $this->openssl_options
+ break;
+ new static('ctr')
+ new static('ctr')
+ new static('ecb')
+ $skip_key_adjustment
+ $ciphertext
+ $ciphertext
+ $i
+ $i
+ $size
+ getFingerprint
+ $type
+ $key === false
+ withPassword
+ 8
+ $block
+ $key
+ $k[$c][++$ki]
+ $k[$c][++$ki]
+ $keys[++$ki]
+ $keys[++$ki]
+ $pc1map[ $l & 0xFF]
+ $pc1map[ $r & 0xFF]
+ $pc1map[($l >> 8) & 0xFF]
+ $pc1map[($l >> 16) & 0xFF]
+ $pc1map[($l >> 24) & 0xFF]
+ $pc1map[($r >> 8) & 0xFF]
+ $pc1map[($r >> 16) & 0xFF]
+ $pc1map[($r >> 24) & 0xFF]
+ $pc2mapc1[ $c >> 24 ]
+ $pc2mapc2[($c >> 16) & 0xFF]
+ $pc2mapc3[($c >> 8) & 0xFF]
+ $pc2mapc4[ $c & 0xFF]
+ $pc2mapd1[ $d >> 24 ]
+ $pc2mapd2[($d >> 16) & 0xFF]
+ $pc2mapd3[($d >> 8) & 0xFF]
+ $pc2mapd4[ $d & 0xFF]
+ $sbox1[($b1 >> 24) & 0x3F]
+ $sbox2[($b2 >> 24) & 0x3F]
+ $sbox3[($b1 >> 16) & 0x3F]
+ $sbox4[($b2 >> 16) & 0x3F]
+ $sbox5[($b1 >> 8) & 0x3F]
+ $sbox6[($b2 >> 8) & 0x3F]
+ $sbox7[ $b1 & 0x3F]
+ $sbox8[ $b2 & 0x3F]
+ $shifts[$i]
+ $shifts[$i]
+ $shuffleinvip[ $l & 0xFF]
+ $shuffleinvip[ $r & 0xFF]
+ $shuffleinvip[($l >> 8) & 0xFF]
+ $shuffleinvip[($l >> 16) & 0xFF]
+ $shuffleinvip[($l >> 24) & 0xFF]
+ $shuffleinvip[($r >> 8) & 0xFF]
+ $shuffleinvip[($r >> 16) & 0xFF]
+ $shuffleinvip[($r >> 24) & 0xFF]
+ $shuffleip[ $l & 0xFF]
+ $shuffleip[ $r & 0xFF]
+ $shuffleip[($l >> 8) & 0xFF]
+ $shuffleip[($l >> 16) & 0xFF]
+ $shuffleip[($l >> 24) & 0xFF]
+ $shuffleip[($r >> 8) & 0xFF]
+ $shuffleip[($r >> 16) & 0xFF]
+ $shuffleip[($r >> 24) & 0xFF]
+ $shuffleinvip[]
+ $shuffleip[]
+ $pc1map[ $l & 0xFF]
+ $pc1map[ $r & 0xFF]
+ $pc1map[($l >> 8) & 0xFF]
+ $pc1map[($l >> 16) & 0xFF]
+ $pc1map[($l >> 24) & 0xFF]
+ $pc1map[($r >> 8) & 0xFF]
+ $pc1map[($r >> 16) & 0xFF]
+ $pc1map[($r >> 24) & 0xFF]
+ $pc2mapc1[ $c >> 24 ]
+ $pc2mapc2[($c >> 16) & 0xFF]
+ $pc2mapc3[($c >> 8) & 0xFF]
+ $pc2mapc4[ $c & 0xFF]
+ $pc2mapd1[ $d >> 24 ]
+ $pc2mapd2[($d >> 16) & 0xFF]
+ $pc2mapd3[($d >> 8) & 0xFF]
+ $pc2mapd4[ $d & 0xFF]
+ $sbox1[($b1 >> 24) & 0x3F]
+ $sbox2[($b2 >> 24) & 0x3F]
+ $sbox3[($b1 >> 16) & 0x3F]
+ $sbox4[($b2 >> 16) & 0x3F]
+ $sbox5[($b1 >> 8) & 0x3F]
+ $sbox6[($b2 >> 8) & 0x3F]
+ $sbox7[ $b1 & 0x3F]
+ $sbox8[ $b2 & 0x3F]
+ $shuffleinvip[ $l & 0xFF]
+ $shuffleinvip[ $r & 0xFF]
+ $shuffleinvip[($l >> 8) & 0xFF]
+ $shuffleinvip[($l >> 16) & 0xFF]
+ $shuffleinvip[($l >> 24) & 0xFF]
+ $shuffleinvip[($r >> 8) & 0xFF]
+ $shuffleinvip[($r >> 16) & 0xFF]
+ $shuffleinvip[($r >> 24) & 0xFF]
+ $shuffleip[ $l & 0xFF]
+ $shuffleip[ $r & 0xFF]
+ $shuffleip[($l >> 8) & 0xFF]
+ $shuffleip[($l >> 16) & 0xFF]
+ $shuffleip[($l >> 24) & 0xFF]
+ $shuffleip[($r >> 8) & 0xFF]
+ $shuffleip[($r >> 16) & 0xFF]
+ $shuffleip[($r >> 24) & 0xFF]
+ self::$shuffle[$pc1map[ $l & 0xFF]]
+ self::$shuffle[$pc1map[ $r & 0xFF]]
+ self::$shuffle[$pc1map[($l >> 8) & 0xFF]]
+ self::$shuffle[$pc1map[($l >> 16) & 0xFF]]
+ self::$shuffle[$pc1map[($l >> 24) & 0xFF]]
+ self::$shuffle[$pc1map[($r >> 8) & 0xFF]]
+ self::$shuffle[$pc1map[($r >> 16) & 0xFF]]
+ self::$shuffle[$pc1map[($r >> 24) & 0xFF]]
+ self::$shuffle[self::$invipmap[$i]]
+ self::$shuffle[self::$ipmap[$i]]
+ $b1
+ $b2
+ $block
+ $c
+ $c
+ $c
+ $cp
+ $d
+ $d
+ $d
+ $dp
+ $key
+ $keys
+ $keys[$des_round][self::DECRYPT][$ki ]
+ $keys[$des_round][self::DECRYPT][$ki - 1]
+ $keys[$des_round][self::ENCRYPT][ ]
+ $keys[$des_round][self::ENCRYPT][ ]
+ $l
+ $l
+ $l
+ $l
+ $l
+ $r
+ $r
+ $r
+ $r
+ $r
+ $shuffleinvip[]
+ $shuffleip[]
+ $t
+ $t
+ $val1
+ $val2
+ string
+ $b1
+ $b1
+ $b1
+ $b1
+ $b2
+ $b2
+ $b2
+ $b2
+ $c
+ $c
+ $c
+ $c
+ $c
+ $c
+ $c
+ $cp
+ $cp
+ $cp
+ $cp
+ $d
+ $d
+ $d
+ $d
+ $d
+ $d
+ $d
+ $dp
+ $dp
+ $dp
+ $dp
+ $k[$c][++$ki]
+ $k[$c][++$ki]
+ $key['c']
+ $key['c']
+ $key['d']
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $pc2mapc1[ $c >> 24 ]
+ $pc2mapd1[ $d >> 24 ]
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $sbox1[($b1 >> 24) & 0x3F] ^ $sbox2[($b2 >> 24) & 0x3F]
+ $sbox2[($b2 >> 24) & 0x3F]
+ $shuffleinvip[ $l & 0xFF]
+ $shuffleinvip[ $r & 0xFF]
+ $shuffleinvip[($l >> 8) & 0xFF]
+ $shuffleinvip[($l >> 16) & 0xFF]
+ $shuffleinvip[($l >> 24) & 0xFF]
+ $shuffleinvip[($r >> 8) & 0xFF]
+ $shuffleinvip[($r >> 16) & 0xFF]
+ $shuffleinvip[($r >> 24) & 0xFF]
+ $shuffleip[ $l & 0xFF]
+ $shuffleip[ $r & 0xFF]
+ $shuffleip[($l >> 8) & 0xFF]
+ $shuffleip[($l >> 16) & 0xFF]
+ $shuffleip[($l >> 24) & 0xFF]
+ $shuffleip[($r >> 8) & 0xFF]
+ $shuffleip[($r >> 16) & 0xFF]
+ $shuffleip[($r >> 24) & 0xFF]
+ ( $cp & 0xFF000000) | (($cp << 8) & 0x00FF0000)
+ ($cp << 8) & 0xFF000000
+ ($key['d'] >> 4) & 0x0FFFFFF0
+ ($r >> 3) & 0x1FFFFFFF
+ ($r >> 31) & 0x00000001
+ (($cp << 8) & 0xFF000000) | (($cp << 16) & 0x00FF0000)
+ (($r >> 3) & 0x1FFFFFFF) ^ ($r << 29)
+ (($r >> 31) & 0x00000001) ^ ($r << 1)
+ self::$shuffle[$pc1map[ $l & 0xFF]]
+ self::$shuffle[$pc1map[ $r & 0xFF]]
+ self::$shuffle[$pc1map[($l >> 8) & 0xFF]]
+ self::$shuffle[$pc1map[($l >> 16) & 0xFF]]
+ self::$shuffle[$pc1map[($l >> 24) & 0xFF]]
+ self::$shuffle[$pc1map[($r >> 8) & 0xFF]]
+ self::$shuffle[$pc1map[($r >> 16) & 0xFF]]
+ self::$shuffle[$pc1map[($r >> 24) & 0xFF]]
+ $key['c']
+ $key['d']
+ $t['l']
+ $t['l']
+ $t['l']
+ $t['r']
+ $t['r']
+ $t['r']
+ $this->openssl_translate_mode()
+ $crypt_block[self::DECRYPT]
+ $crypt_block[self::ENCRYPT]
+ $keys[0]
+ $keys[0]
+ $keys[1]
+ $keys[2]
+ $this->keys[self::DECRYPT]
+ $this->keys[self::ENCRYPT]
+ $key['c']
+ $key['d']
+ $t['l']
+ $t['l']
+ $t['l']
+ $t['r']
+ $t['r']
+ $t['r']
+ $this->kl['des_rounds']
+ setupInlineCrypt
+ $key_length
+ $openssl_mode_names
+ $keys
+ DES
+ DES
+ DES
+ DES
+ DES
+ DES
+ DES
+ DES
+ DES
+ $this->kl
+ $args[0]
+ string
+ $new
+ bool
+ $args
+ computeSecret
+ $key
+ $key
+ $new->base
+ $new->prime
+ $new->privateKey
+ $new->publicKey
+ $type
+ $type::saveParameters($this->prime, $this->base)
+ powMod
+ toBytes
+ $args[0]
+ $args[0]
+ $args[0]
+ $args[1]
+ $components['base']
+ $components['prime']
+ onLoad
+ $new->privateKey
+ $new->publicKey
+ $public->publicKey
+ $decoded[0]
+ $key
+ $decoded[0]
+ PKCS1
+ $privateKey
+ $publicKey
+ $decoded[0]
+ $key[$type . 'Algorithm']['parameters']->element
+ $key[$type]
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $key[$type . 'Algorithm']['parameters']
+ $components[$type]
+ $key[$type . 'Algorithm']['parameters']->element
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $key[$type . 'Algorithm']
+ $key[$type]
+ !is_array($decoded)
+ PKCS8
+ $type
+ string
+ $type::saveParameters($this->prime, $this->base, $options)
+ $type::saveParameters($this->prime, $this->base, $options)
+ Parameters
+ Parameters
+ Parameters
+ DH::loadFormat('PKCS8', $key)
+ $key
+ $key
+ $type
+ $type
+ string
+ $type::savePrivateKey($this->prime, $this->base, $this->privateKey, $this->publicKey, $this->password, $options)
+ $type::savePublicKey($this->prime, $this->base, $this->publicKey)
+ $type::savePrivateKey($this->prime, $this->base, $this->privateKey, $this->publicKey, $this->password, $options)
+ DH\PublicKey
+ $privateKey
+ $publicKey
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ isset($this->publicKey)
+ isset($this->publicKey)
+ $type
+ \phpseclib3\Math\BigInteger
+ string
+ $type::savePublicKey($this->prime, $this->base, $this->publicKey, $options)
+ $this->publicKey
+ $type::savePublicKey($this->prime, $this->base, $this->publicKey, $options)
+ PublicKey
+ PublicKey
+ PublicKey
+ $this->publicKey
+ $this->publicKey
+ count($args) == 1 && $args[0] instanceof Parameters
+ count($args) == 2 && is_int($args[0])
+ is_int($args[0])
+ is_int($args[1])
+ $new
+ bool
+ getParameters
+ $args[0]
+ $args[1]
+ $key
+ $key
+ $new->g
+ $new->p
+ $new->q
+ $new->sigFormat
+ $new->x
+ $new->y
+ $this->sigFormat
+ $type
+ DSA\PrivateKey
+ $type::saveParameters($this->p, $this->q, $this->g)
+ $params->g
+ $params->hash
+ $params->p
+ $params->q
+ $params->shortFormat
+ $args[0]
+ $args[0]
+ $args[1]
+ $components['g']
+ $components['p']
+ $components['q']
+ self::$engines['OpenSSL']
+ getEngine
+ getLength
+ getSignatureFormat
+ onLoad
+ $g
+ $p
+ $q
+ $y
+ DSA
+ withSignatureFormat
+ withSignatureFormat
+ $g
+ $g
+ $p
+ $p
+ $q
+ $q
+ $x
+ $y
+ $y
+ $parsed['paddedKey']
+ $parsed['paddedKey']
+ $parsed['publicKey']
+ $comment
+ $comment
+ $comment
+ $parsed['comment']
+ $parsed['publicKey']
+ $parsed['type']
+ $parsed[type]
+ OpenSSH
+ $y
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $key
+ $decoded[0]
+ PKCS1
+ $x
+ $y
+ $decoded[0]
+ $decoded[0]
+ $key[$type . 'Algorithm']['parameters']->element
+ $key[$type]
+ $key[$type . 'Algorithm']['parameters']
+ $components['meta']
+ $key[$type . 'Algorithm']['parameters']->element
+ $decoded[0]
+ $decoded[0]
+ $key[$type . 'Algorithm']
+ $key[$type]
+ $components[$var] instanceof BigInteger
+ PKCS8
+ $g
+ $g
+ $p
+ $p
+ $q
+ $q
+ $x
+ $y
+ $y
+ string
+ $components['public']
+ $private
+ $public
+ PuTTY
+ compact('p', 'q', 'g', 'y')
+ compact('p', 'q', 'g', 'y', 'x')
+ string
+ string
+ $key['g']
+ $key['p']
+ $key['q']
+ Raw
+ $key
+ $components
+ array
+ $components['g']
+ $components['p']
+ $components['q']
+ $components['y']
+ $temp->item(0)->nodeValue
+ $temp->item(0)->nodeValue
+ $components
+ $components
+ $components
+ $components
+ Strings::is_stringable($key)
+ XML
+ $components
+ array|bool
+ $decoded[0]
+ $components
+ $decoded[0]
+ is_string($sig)
+ Raw
+ false
+ string
+ load
+ $blob
+ $blob
+ $result === false
+ is_string($sig)
+ SSH2
+ $type
+ string
+ $type::saveParameters($this->p, $this->q, $this->g, $options)
+ $type::saveParameters($this->p, $this->q, $this->g, $options)
+ Parameters
+ Parameters
+ Parameters
+ Parameters
+ Parameters
+ $format::save($r, $s)
+ getPublicKey
+ $key
+ $key
+ $type
+ $type
+ string
+ string
+ $format::save($r, $s)
+ $type::savePrivateKey($this->p, $this->q, $this->g, $this->y, $this->x, $this->password, $options)
+ $type::savePublicKey($this->p, $this->q, $this->g, $this->y)
+ $format::save($r, $s)
+ $format::save($r, $s)
+ $type::savePrivateKey($this->p, $this->q, $this->g, $this->y, $this->x, $this->password, $options)
+ ASN1Signature::load($signature)
+ self::$engines['OpenSSL']
+ $r
+ $s
+ $x
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ isset($this->y)
+ isset($this->y)
+ withSignatureFormat
+ $format::load($signature)
+ $message
+ $message
+ $params
+ $params
+ $r
+ $r
+ $s
+ $sig
+ $u2
+ $w
+ self::$one
+ $u2
+ $params
+ $sig
+ $type
+ $w
+ [, $u2]
+ string
+ $type::savePublicKey($this->p, $this->q, $this->g, $this->y, $options)
+ between
+ between
+ divide
+ modInverse
+ multiply
+ $type::savePublicKey($this->p, $this->q, $this->g, $this->y, $options)
+ PublicKey
+ PublicKey
+ PublicKey
+ PublicKey
+ PublicKey
+ $decoded
+ $new
+ $new
+ $new->withHash($components['curve']::HASH)
+ bool
+ $privatekey
+ $privatekey->withHash($curve::HASH)
+ getParameters
+ $components['curve']::HASH
+ $curve::HASH
+ $dA->toBytes()
+ $decoded[0]
+ $key
+ $params
+ $this->QA[0]->toBytes(true)
+ $dA
+ $key
+ $new->QA
+ $new->curve
+ $new->curve
+ $new->dA
+ $params
+ $privatekey->QA
+ $privatekey->dA
+ $this->curveName
+ $type
+ string
+ string|array
+ $type::saveParameters($this->curve)
+ createRandomMultiplier
+ getBasePoint
+ multiplyPoint
+ new $curve()
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toString
+ $this->QA[0]->toBytes(true)
+ $this->QA[1]->toBytes(true)
+ $decoded['namedCurve']
+ $this->curve->encodePoint($this->QA)
+ PrivateKey
+ $decoded
+ null
+ $decoded[0]
+ $this->QA[0]
+ $this->QA[0]
+ $this->QA[1]
+ $components['QA']
+ $components['curve']
+ $components['curve']
+ self::$engines['OpenSSL']
+ self::$engines['libsodium']
+ self::$engines['libsodium']
+ getContext
+ getEngine
+ getLength
+ getSignatureFormat
+ onLoad
+ $q
+ $x
+ $QA
+ $context
+ $curve
+ $curveName
+ $format
+ $q
+ $x
+ $curve
+ $this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)
+ is_string($context)
+ $decoded
+ encodePoint
+ withSignatureFormat
+ $new->dA
+ $new->sigFormat
+ $privatekey->curveName
+ $this->sigFormat
+ $namedCurves
+ $this->convertToAffine($r)
+ int[]
+ object
+ $doubles
+ $doubles
+ $doubles
+ $doubles
+ $doubles
+ $factory
+ $order
+ $one
+ $one
+ $points[0]
+ $points[1]
+ $r
+ $r[0]
+ $scalars[0]
+ $scalars[1]
+ $zero
+ $r
+ $r[$d_i]
+ $r[1 - $d_i]
+ $temp[]
+ array
+ integer
+ integer
+ object
+ object
+ negate
+ $alreadyInternal ? $r[0] : $this->convertToAffine($r[0])
+ $this->factory->getLength()
+ $this->factory->getLengthInBytes()
+ $this->factory->newInteger($x)
+ $this->factory->randomInteger()
+ $p
+ $p
+ $temp
+ object[]
+ object[]
+ object[]
+ $p[0]
+ $p[1]
+ $points[0]
+ $points[1]
+ $r[0]
+ $r[0]
+ $r[0]
+ $r[1]
+ $scalars[0]
+ $scalars[1]
+ createRandomMultiplier
+ randomInteger
+ setReduction
+ $doubles
+ isset($this->order)
+ $this->factory
+ $this->factory
+ $this->factory
+ $this->factory
+ $this->factory
+ \phpseclib3\Math\FiniteField\Integer
+ addPoint
+ addPoint
+ doublePoint
+ $naf
+ $this->p
+ array
+ $this->a
+ $this->b
+ $a
+ $b
+ $factory
+ $modulo
+ $one
+ $order
+ $p
+ $m
+ $modulo
+ $lhs
+ $lhs
+ $rhs
+ $this->a
+ $this->b
+ $x2
+ $x3
+ $z
+ $z
+ $z2
+ FiniteField[]
+ FiniteField[]
+ boolean
+ add
+ add
+ add
+ divide
+ equals
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ newInteger
+ newInteger
+ newInteger
+ newInteger
+ $lhs->equals($rhs)
+ $p
+ $p
+ $p
+ \phpseclib3\Math\PrimeField\Integer[]
+ \phpseclib3\Math\PrimeField\Integer[]
+ \phpseclib3\Math\PrimeField\Integer
+ \phpseclib3\Math\PrimeField\Integer
+ $factory
+ pack('H*', $a)
+ pack('H*', $b)
+ pack('H*', $x)
+ pack('H*', $y)
+ addPoint
+ derivePoint
+ doublePoint
+ verifyPoint
+ isset($this->factory)
+ isset($this->factory)
+ isset($this->factory)
+ FiniteField[]
+ FiniteField[]
+ $lambdas[0]
+ $this->p
+ $this->p[0]
+ BigInteger[]
+ $p
+ $basis['a']->toHex(true)
+ $basis['b']->toHex(true)
+ $one
+ $p
+ $p['naf']
+ $r->multiply($two)
+ $r->multiply($two)
+ $rhs
+ $two
+ $c1
+ $c2
+ $p['naf']
+ $p['nafwidth']
+ $p[0]
+ $p[0]
+ $p[1]
+ $p[1]
+ $r
+ $r
+ $v1
+ $v1['a']
+ $v1['b']
+ $v1['b']
+ $v2
+ $v2['a']
+ $v2['b']
+ $v2['b']
+ $a2
+ $b2
+ $beta['nafwidth']
+ $c1
+ $c1
+ $c2
+ $c2
+ $inv
+ $k
+ $k1
+ $k1
+ $k2
+ $k2
+ $lhs
+ $lhs
+ $npoints[$pos]
+ $nscalars[$pos]
+ $nscalars[$pos]
+ $p
+ $p1
+ $p2
+ $q1
+ $q2
+ $rhs
+ $rhs
+ $rhs
+ $s
+ $temp
+ [$c1, $r]
+ [$c2, $r]
+ [$v1, $v2]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ boolean
+ add
+ add
+ add
+ add
+ add
+ add
+ compare
+ divide
+ divide
+ divide
+ equals
+ equals
+ isNegative
+ isNegative
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ negate
+ negate
+ negate
+ negate
+ negate
+ negate
+ negate
+ squareRoot
+ subtract
+ subtract
+ subtract
+ toBigInteger
+ toHex
+ toHex
+ $lhs->equals($rhs)
+ multiply
+ $this->multiplyPoint($this->p, $lambdas[0])[0]
+ $a0
+ $a0
+ $b0
+ $b0
+ $this->factory
+ $this->factory
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ $basis
+ $basis
+ $this->basis
+ $this->beta
+ $this->p
+ PrimeInteger[]
+ array
+ [clone $this->zero, clone $this->one]
+ $a
+ $a24
+ $factory
+ $modulo
+ $one
+ $order
+ $p
+ $zero
+ $x
+ $x
+ $x
+ $z
+ FiniteField[][]
+ divide
+ $p
+ $p
+ $p
+ [$x->divide($z)]
+ \phpseclib3\Math\PrimeField\Integer[]
+ \phpseclib3\Math\PrimeField\Integer[]
+ $factory
+ $p[0]
+ setBasePoint
+ setCoefficients
+ $a24
+ $modulo
+ isset($this->factory)
+ isset($this->factory)
+ isset($this->factory)
+ FiniteField[][]
+ $x
+ $jsf[0]
+ $jsf[0][$j]
+ $jsf[1][$j]
+ new PrimeField($modulo)
+ $jsf
+ $res
+ $this->convertToAffine($acc)
+ $this->p
+ array
+ int[]
+ int[]
+ $this->a
+ $this->b
+ $a
+ $a
+ $b
+ $b
+ $eight
+ $eight
+ $factory
+ $factory
+ $four
+ $four
+ $modulo
+ $modulo
+ $one
+ $one
+ $order
+ $order
+ $p
+ $p
+ $three
+ $three
+ $two
+ $two
+ $m
+ $point
+ $wnd
+ $m
+ $naf[$a]
+ $naf[$b]
+ $p
+ $point
+ $point
+ $points[$a]
+ $points[$a]
+ $points[$b]
+ $points[$b]
+ $res[$i - 1]
+ $scalars[$a]
+ $scalars[$b]
+ $wnd[$j][(-$z - 1) >> 1]
+ $point['naf']
+ $points[$i]['nafwidth']
+ $points[0]['nafwidth']
+ $point['naf']
+ $wnd[$j][($z - 1) >> 1]
+ $b
+ $bn
+ $jsf[0][]
+ $jsf[1][]
+ $k1
+ $k1
+ $k2
+ $k2
+ $lhs
+ $m14
+ $m14
+ $m14
+ $m24
+ $m24
+ $m24
+ $m8
+ $m8
+ $m8
+ $m8
+ $m8
+ $m8
+ $max
+ $naf[$a]
+ $naf[$b]
+ $p
+ $point
+ $rhs
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp[$j]
+ $this->a
+ $this->b
+ $u1
+ $u2
+ $wndWidth[]
+ $yp
+ $z
+ $z
+ $z
+ $z2
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ boolean
+ int[]
+ add
+ add
+ add
+ add
+ bitwise_rightShift
+ bitwise_rightShift
+ compare
+ compare
+ divide
+ equals
+ getNAF
+ getNAF
+ isOdd
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ negate
+ newInteger
+ newInteger
+ newInteger
+ newInteger
+ squareRoot
+ testBit
+ testBit
+ testBit
+ testBit
+ testBit
+ testBit
+ testBit
+ testBit
+ testBit
+ testBit
+ $k1->testBit(0)
+ $k1->testBit(0)
+ $k1->testBit(1)
+ $k1->testBit(1)
+ $k1->testBit(2)
+ $k2->testBit(0)
+ $k2->testBit(0)
+ $k2->testBit(1)
+ $k2->testBit(1)
+ $k2->testBit(2)
+ $m14
+ $m14
+ $m14
+ $m24
+ $m24
+ $m24
+ $m8
+ $m8
+ $m8
+ $m8
+ $u1
+ $u2
+ $wnd
+ $z
+ 1 << $wnd
+ $lhs->equals($rhs)
+ $point['naf']
+ $p
+ $p
+ $p
+ \phpseclib3\Math\PrimeField\Integer[]
+ \phpseclib3\Math\PrimeField\Integer[]
+ \phpseclib3\Math\PrimeField\Integer
+ \phpseclib3\Math\PrimeField\Integer
+ $factory
+ $p
+ $wnd[$j][(-$z - 1) >> 1]
+ $dbl
+ $jsf[0]
+ $points[0]
+ derivePoint
+ doublePointHelper
+ jacobianAddPoint
+ jacobianAddPointMixedX
+ jacobianAddPointMixedXY
+ jacobianDoublePoint
+ jacobianDoublePointMixed
+ verifyPoint
+ $p
+ $p
+ $q
+ $eight
+ $four
+ isset($this->factory)
+ isset($this->factory)
+ isset($this->factory)
+ $this->factory
+ $this->factory
+ $this->factory
+ $this->factory
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ FiniteField[]
+ \phpseclib3\Math\PrimeFields
+ toBigInteger
+ toBigInteger
+ $p
+ new PrimeField($modulo)
+ $this->a
+ $this->d
+ $a
+ $d
+ $modulo
+ $one
+ $p
+ $two
+ $zero
+ $x
+ $y
+ $lhs
+ $rhs
+ $this->a
+ $this->d
+ $x2
+ $y2
+ $z
+ $z
+ boolean
+ add
+ add
+ divide
+ equals
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ $lhs->equals($rhs)
+ $p
+ \phpseclib3\Math\PrimeField\Integer[]
+ \phpseclib3\Math\PrimeField\Integer
+ \phpseclib3\Math\PrimeField\Integer
+ getA
+ getD
+ isset($this->factory)
+ isset($this->factory)
+ isset($this->factory)
+ $this->factory
+ $this->factory
+ $this->factory
+ $this->factory
+ [$this->factory->newInteger(new BigInteger(9))]
+ newInteger
+ newInteger
+ Curve25519
+ Curve25519
+ Curve25519
+ Curve25519
+ Curve25519
+ Curve25519
+ Curve25519
+ $this->factory
+ $this->factory
+ [$this->factory->newInteger(new BigInteger(5))]
+ newInteger
+ newInteger
+ Curve448
+ Curve448
+ Curve448
+ Curve448
+ Curve448
+ Curve448
+ Curve448
+ $this->factory
+ $this->factory
+ $dA
+ $this->extractSecret(Random::string(32))
+ clone $this->zero
+ BigInteger
+ \phpseclib3\Math\PrimeField\Integer
+ [clone $this->zero, clone $this->one, clone $this->one, clone $this->zero]
+ $y
+ $y[0]
+ $y[0]
+ $y[0]
+ $p[3]
+ $temp
+ $u
+ $v
+ $x
+ $x
+ $x
+ $x2
+ $y
+ $y
+ $y2
+ $y[0]
+ $y[0]
+ FiniteField[]
+ FiniteField[]
+ add
+ divide
+ equals
+ equals
+ equals
+ isOdd
+ isOdd
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ negate
+ pow
+ pow
+ subtract
+ subtract
+ subtract
+ toBytes
+ $y[0]
+ $y[0]
+ $p
+ $p
+ [$x, $y]
+ \phpseclib3\Math\PrimeField\Integer[]
+ object[]
+ $p[0]
+ $p[1]
+ addPoint
+ doublePoint
+ recoverX
+ Ed25519
+ Ed25519
+ Ed25519
+ Ed25519
+ Ed25519
+ Ed25519
+ Ed25519
+ Ed25519
+ Ed25519
+ Ed25519
+ $this->factory
+ FiniteField[]
+ FiniteField[]
+ $dA->secret
+ $dA
+ $this->extractSecret(Random::string(57))
+ clone $this->zero
+ BigInteger
+ \phpseclib3\Math\PrimeField\Integer
+ [clone $this->zero, clone $this->one, clone $this->one]
+ $u
+ $v
+ $x
+ $x
+ $x2
+ $y
+ $y2
+ FiniteField[]
+ FiniteField[]
+ divide
+ equals
+ equals
+ isOdd
+ isOdd
+ multiply
+ multiply
+ multiply
+ negate
+ pow
+ subtract
+ subtract
+ subtract
+ toBytes
+ $y->toBytes()
+ $p
+ $p
+ [$x, $y]
+ \phpseclib3\Math\PrimeField\Integer[]
+ object[]
+ addPoint
+ doublePoint
+ encodePoint
+ recoverX
+ Ed448
+ Ed448
+ Ed448
+ Ed448
+ Ed448
+ Ed448
+ Ed448
+ Ed448
+ Ed448
+ Ed448
+ $this->factory
+ FiniteField[]
+ FiniteField[]
+ $dA->secret
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160r1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP160t1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192r1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP192t1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224r1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP224t1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256r1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP256t1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320r1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP320t1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384r1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP384t1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512r1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ brainpoolP512t1
+ nistb233
+ nistb233
+ nistb409
+ nistb409
+ nistk163
+ nistk163
+ nistk233
+ nistk233
+ nistk283
+ nistk283
+ nistk409
+ nistk409
+ nistp192
+ nistp192
+ nistp224
+ nistp224
+ nistp256
+ nistp256
+ nistp384
+ nistp384
+ nistp521
+ nistp521
+ nistt571
+ nistt571
+ prime192v1
+ prime192v1
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v2
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime192v3
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v1
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v2
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime239v3
+ prime256v1
+ prime256v1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r1
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp112r2
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r1
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ secp128r2
+ newInteger
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ secp160k1
+ $this->factory
+ $this->basis
+ $this->basis
+ $this->basis
+ $this->beta
+ $this->factory
+ secp160k1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r1
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ secp160r2
+ newInteger
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ secp192k1
+ $this->factory
+ $this->basis
+ $this->basis
+ $this->basis
+ $this->beta
+ $this->factory
+ secp192k1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ secp192r1
+ newInteger
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ secp224k1
+ $this->factory
+ $this->basis
+ $this->basis
+ $this->basis
+ $this->beta
+ $this->factory
+ secp224k1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ secp224r1
+ newInteger
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ secp256k1
+ $this->factory
+ $this->basis
+ $this->basis
+ $this->basis
+ $this->beta
+ $this->factory
+ secp256k1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp256r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp384r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ secp521r1
+ sect113r1
+ sect113r1
+ sect113r1
+ sect113r1
+ sect113r1
+ sect113r1
+ sect113r1
+ sect113r1
+ sect113r1
+ sect113r2
+ sect113r2
+ sect113r2
+ sect113r2
+ sect113r2
+ sect113r2
+ sect113r2
+ sect113r2
+ sect113r2
+ sect131r1
+ sect131r1
+ sect131r1
+ sect131r1
+ sect131r1
+ sect131r1
+ sect131r1
+ sect131r1
+ sect131r1
+ sect131r2
+ sect131r2
+ sect131r2
+ sect131r2
+ sect131r2
+ sect131r2
+ sect131r2
+ sect131r2
+ sect131r2
+ sect163k1
+ sect163k1
+ sect163k1
+ sect163k1
+ sect163k1
+ sect163k1
+ sect163k1
+ sect163k1
+ sect163r1
+ sect163r1
+ sect163r1
+ sect163r1
+ sect163r1
+ sect163r1
+ sect163r1
+ sect163r1
+ sect163r1
+ sect163r2
+ sect163r2
+ sect163r2
+ sect163r2
+ sect163r2
+ sect163r2
+ sect163r2
+ sect163r2
+ sect163r2
+ sect193r1
+ sect193r1
+ sect193r1
+ sect193r1
+ sect193r1
+ sect193r1
+ sect193r1
+ sect193r1
+ sect193r1
+ sect193r2
+ sect193r2
+ sect193r2
+ sect193r2
+ sect193r2
+ sect193r2
+ sect193r2
+ sect193r2
+ sect193r2
+ sect233k1
+ sect233k1
+ sect233k1
+ sect233k1
+ sect233k1
+ sect233k1
+ sect233k1
+ sect233k1
+ sect233r1
+ sect233r1
+ sect233r1
+ sect233r1
+ sect233r1
+ sect233r1
+ sect233r1
+ sect233r1
+ sect239k1
+ sect239k1
+ sect239k1
+ sect239k1
+ sect239k1
+ sect239k1
+ sect239k1
+ sect239k1
+ sect239k1
+ sect283k1
+ sect283k1
+ sect283k1
+ sect283k1
+ sect283k1
+ sect283k1
+ sect283k1
+ sect283k1
+ sect283r1
+ sect283r1
+ sect283r1
+ sect283r1
+ sect283r1
+ sect283r1
+ sect283r1
+ sect283r1
+ sect283r1
+ sect409k1
+ sect409k1
+ sect409k1
+ sect409k1
+ sect409k1
+ sect409k1
+ sect409k1
+ sect409k1
+ sect409r1
+ sect409r1
+ sect409r1
+ sect409r1
+ sect409r1
+ sect409r1
+ sect409r1
+ sect409r1
+ sect571k1
+ sect571k1
+ sect571k1
+ sect571k1
+ sect571k1
+ sect571k1
+ sect571k1
+ sect571k1
+ sect571r1
+ sect571r1
+ sect571r1
+ sect571r1
+ sect571r1
+ sect571r1
+ sect571r1
+ sect571r1
+ sect571r1
+ $class
+ $point
+ $point
+ string|false
+ new $class()
+ $curve->getModulo()
+ $data['curve']['a']
+ $data['curve']['a']
+ $data['curve']['b']
+ $data['curve']['b']
+ $data['fieldID']['parameters']
+ $data['fieldID']['parameters']
+ $data['order']
+ $data['order']
+ $m
+ $modulo[0]
+ $modulo[0]
+ $modulo[1]
+ $modulo[2]
+ $params['parameters']
+ $params[0]
+ $point
+ $temp[0]
+ $curveX
+ $curveX
+ $curveY
+ $curveY
+ $data['base']
+ $data['base']
+ $data['curve']
+ $data['curve']
+ $data['curve']
+ $data['curve']
+ $data['fieldID']
+ $data['fieldID']
+ $data['fieldID']
+ $data['fieldID']
+ $data['order']
+ $data['order']
+ $point[0]
+ $point[1]
+ $data
+ $m
+ $point
+ $point
+ $useNamedCurves
+ $x
+ $y
+ [$curveX, $curveY]
+ [$curveX, $curveY]
+ \phpseclib3\Crypt\EC\BaseCurves\Base|false
+ object[]
+ new $curve()
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toString
+ toString
+ toString
+ toString
+ toString
+ $data['base']
+ $data['base']
+ $data['fieldID']['fieldType']
+ $params['namedCurve']
+ $params['namedCurve']
+ $x
+ $x
+ $y
+ $y
+ $params['basis']
+ $params['m']
+ $params['parameters']
+ $params['parameters']
+ $temp['k1']
+ $temp['k2']
+ $temp['k3']
+ $params['basis']
+ $params['m']
+ $params['parameters']
+ $params['parameters']
+ $temp['k1']
+ $temp['k2']
+ $temp['k3']
+ $m
+ $params['parameters']
+ $params['basis']
+ $params['m']
+ $params['parameters']
+ $params['parameters']
+ $temp['k1']
+ $temp['k2']
+ $temp['k3']
+ $params
+ $params
+ $params
+ $params
+ $temp
+ $temp
+ $temp
+ toString
+ toString
+ toString
+ toString
+ toString
+ $modulo[0]
+ $modulo[0]
+ $modulo[1]
+ $modulo[2]
+ $params[0]
+ $temp[0]
+ $params['basis']
+ $params['m']
+ $params['parameters']
+ $params['parameters']
+ $temp['k1']
+ $temp['k2']
+ $temp['k3']
+ setImplicitCurve
+ !$order
+ $order
+ $params
+ $params
+ $params
+ $params
+ $temp
+ $temp
+ $temp
+ derivePoint
+ getA
+ getA
+ getB
+ getB
+ getBasePoint
+ getBasePoint
+ getBasePoint
+ getModulo
+ getModulo
+ recoverX
+ verifyPoint
+ self::$implicitCurve
+ self::$implicitCurve
+ $len
+ $publicKey[0]->toBytes()
+ $publicKey[0]
+ !empty($password) && is_string($password)
+ is_string($password)
+ toBytes
+ MontgomeryPrivate
+ $publicKey[0]->toBytes()
+ $publicKey[0]
+ toBytes
+ MontgomeryPublic
+ $curve
+ $privateKey
+ new $curveName()
+ $key
+ $paddedKey
+ $parsed['publicKey']
+ $parsed['publicKey']
+ $parsed['publicKey']
+ $privateKey
+ $privateKey->secret
+ $comment
+ $key['comment']
+ $oid
+ $paddedKey
+ string
+ $comment
+ $comment
+ $curveName
+ $publicKey
+ $alias
+ rangeCheck
+ $publicKey[0]
+ $publicKey[0]
+ $publicKey[1]
+ $publicKey[1]
+ $parsed['comment']
+ $parsed['publicKey']
+ $parsed['publicKey']
+ $parsed['publicKey']
+ $parsed['type']
+ $parsed['type']
+ $parsed[type]
+ savePrivateKey
+ $curve instanceof Ed25519
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ $components['curve']->getBasePoint()
+ $components['curve']->getBasePoint()
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $ecPrivate['parameters']
+ $ecPrivate['privateKey']
+ $ecPrivate['publicKey']
+ $ecPrivate['publicKey']
+ $key['parameters']
+ $key['privateKey']
+ $components['curve']
+ $components['curve']
+ $ecParams
+ $key
+ self::encodeParameters($curve)
+ getBasePoint
+ multiplyPoint
+ rangeCheck
+ $decoded
+ $decoded
+ $key
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $matches[0]
+ $matches[0]
+ $publicKey[0]
+ $publicKey[1]
+ $ecPrivate['privateKey']
+ $key['privateKey']
+ saveParameters
+ savePrivateKey
+ getBasePoint
+ getBasePoint
+ toBytes
+ toBytes
+ $ecPrivate
+ $components['dA']
+ $components['curve']->getBasePoint()
+ $curve->encodePoint($publicKey)
+ $decoded[0]
+ $decoded[0]
+ $key[$type . 'Algorithm']['parameters']->element
+ $key['privateKey']
+ $key['privateKey']
+ $key['privateKey']
+ $key['privateKey']
+ $key['publicKey']
+ $key['publicKey']
+ $key[$type . 'Algorithm']['algorithm']
+ $key[$type . 'Algorithm']['parameters']
+ $key['privateKeyAlgorithm']['algorithm']
+ $key['publicKeyAlgorithm']['algorithm']
+ $key['publicKey']
+ $privateKey->secret
+ $key[$type . 'Algorithm']['parameters']->element
+ $components['curve']
+ self::encodeParameters($curve, false, $options)
+ self::encodeParameters($curve, false, $options)
+ rangeCheck
+ $params
+ $key['privateKey']
+ $key['privateKey']
+ $key['privateKey']
+ $key['privateKey']
+ $key
+ $components['curve']
+ $components['dA']
+ $decoded[0]
+ $decoded[0]
+ $publicKey[0]
+ $publicKey[0]
+ $publicKey[1]
+ $publicKey[1]
+ $key[$type . 'Algorithm']
+ $key[$type . 'Algorithm']
+ $key['privateKey']
+ $key['privateKey']
+ $key['privateKeyAlgorithm']
+ $key['publicKey']
+ $key['publicKeyAlgorithm']
+ savePrivateKey
+ savePublicKey
+ $key
+ $key
+ $key
+ encodePoint
+ getBasePoint
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ $privateKey->secret
+ $publicKey
+ string
+ $components['type']
+ $length
+ $length
+ $private
+ $private
+ $private
+ $privateKey->secret
+ $components['dA']
+ $private
+ rangeCheck
+ $components['comment']
+ $components['public']
+ $components['type']
+ $length
+ $length
+ $public[1]
+ $public[1]
+ $components['comment']
+ $components['curve']
+ $components['public']
+ $components['type']
+ $private
+ savePrivateKey
+ savePublicKey
+ $types
+ extractSecret
+ $privateKey->secret
+ $key
+ $point
+ $xml
+ $result['namedCurve']
+ $result['specifiedCurve']
+ $result['specifiedCurve']
+ $result['namedCurve']
+ $result['specifiedCurve']
+ $result['specifiedCurve']
+ \DOMNodeList|string
+ $publicKey[0]
+ $publicKey[1]
+ new $curve()
+ \phpseclib3\Crypt\EC\BaseCurves\Base|false
+ string|false
+ isolateNamespace
+ $key
+ $key
+ $oid
+ $p
+ $p
+ $temp['base']
+ $temp['curve']['a']
+ $temp['curve']['b']
+ $temp['fieldID']['parameters']->toBytes()
+ $temp['order']
+ $x->item(0)->getAttribute('Value')
+ $y->item(0)->getAttribute('Value')
+ $temp['base']
+ $temp['curve']
+ $temp['curve']
+ $temp['fieldID']
+ $temp['fieldID']
+ $temp['fieldID']
+ $temp['fieldID']
+ $temp['fieldID']
+ $temp['fieldID']
+ $temp['order']
+ $x
+ $y
+ self::$curveOIDs[$result['namedCurve']]
+ $a
+ $b
+ $key
+ $key
+ $oid
+ $temp
+ $temp
+ $temp
+ $temp
+ [$x, $y]
+ new $curve()
+ toBytes
+ $a
+ $b
+ $temp['fieldID']['fieldType']
+ $temp['fieldID']['fieldType']
+ $temp['fieldID']['parameters']
+ $x
+ $y
+ self::$curveOIDs[$result['namedCurve']]
+ \phpseclib3\Crypt\EC\BaseCurves\Base|false
+ $decode ? self::decodeValue($result->item(0)->textContent) : $result->item(0)->textContent
+ $curve
+ $curve
+ self::encodeXMLParameters($curve, $pre, $options)
+ self::encodeXMLParameters($curve, $pre, $options)
+ $a
+ $a
+ $b
+ $b
+ $order
+ $order
+ $x
+ $y
+ item
+ item
+ item
+ item
+ item
+ item
+ item
+ $base
+ $pubkey
+ $namedCurve->length
+ $params->length
+ $params->length
+ $result->length
+ $result->length
+ $x->length
+ $y->length
+ self::query($xpath, 'ecdsakeyvalue')->length
+ $result->item(0)->textContent
+ $result->item(0)->textContent
+ $oid
+ $result->item(0)->textContent
+ $result->item(0)->textContent
+ $result->item(0)->textContent
+ $result->item(0)->textContent
+ getAttribute
+ getAttribute
+ getAttribute
+ hasAttribute
+ hasAttribute
+ lookupPrefix
+ $publicKey[0]
+ $publicKey[0]
+ $publicKey[1]
+ $publicKey[1]
+ disableRFC4050Syntax
+ load
+ savePublicKey
+ setNamespace
+ getA
+ getAttribute
+ getAttribute
+ getAttribute
+ getB
+ getBasePoint
+ hasAttribute
+ hasAttribute
+ removeAttributeNS
+ toBytes
+ toBytes
+ verifyPoint
+ $p
+ $p
+ $curve->multiplyPoint($curve->getBasePoint(), $components['dA'])
+ $components['dA']
+ $private
+ $privateKey->secret
+ $components['dA']
+ savePrivateKey
+ savePublicKey
+ $password
+ !empty($password) && is_string($password)
+ is_string($password)
+ isset($public)
+ false
+ false
+ $components
+ array
+ $decoded[0]
+ $components
+ $decoded[0]
+ is_string($sig)
+ Raw
+ false
+ $r
+ $s
+ string
+ load
+ $blob
+ $result[0]
+ $result[1]
+ $result === false
+ $result === false
+ is_string($sig)
+ SSH2
+ $type
+ string
+ $type::saveParameters($this->curve, $options)
+ $type::saveParameters($this->curve, $options)
+ Parameters
+ Parameters
+ Parameters
+ Parameters
+ Parameters
+ Parameters
+ $dA
+ $this->dA
+ $this->dA
+ getPublicKey
+ sign
+ $curve::HASH
+ $curve::SIZE
+ $curve::SIZE
+ $dA->multiply($r)
+ $key
+ $point[0]->toBytes(true)
+ $this->curve->getBasePoint()
+ $this->dA->secret
+ $this->dA->toBytes()
+ $this->withPassword()->toString('libsodium')
+ $r
+ $A
+ $R
+ $format
+ $key
+ $key
+ $key
+ $type
+ $type
+ $x
+ [, $r]
+ string
+ string
+ $format::save($r, $s)
+ $format::save($r, $s)
+ $format::save($r, $s, $this->getCurve())
+ $format::save($r, $s, $this->getCurve())
+ $type::savePrivateKey($this->dA, $this->curve, $this->QA, $this->password, $options)
+ $type::savePublicKey($this->curve, $this->QA)
+ divide
+ equals
+ multiply
+ toBigInteger
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toString
+ withContext
+ $A
+ $R
+ $R
+ $R
+ $point[0]->toBytes(true)
+ $point[1]->toBytes(true)
+ $this->curve->encodePoint($point)
+ $type::savePrivateKey($this->dA, $this->curve, $this->QA, $this->password, $options)
+ $this->getCurve()
+ $this->getCurve()
+ $point[0]
+ $point[0]
+ $point[1]
+ self::$engines['OpenSSL']
+ self::$engines['libsodium']
+ self::$engines['libsodium']
+ $r
+ $r
+ $s
+ $s
+ $dA
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ !isset($this->context)
+ $this->context
+ $this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)
+ ''
+ 'SigEd25519 no Ed25519 collisions' . "\0" . chr(strlen($this->context)) . $this->context
+ $curve::HASH
+ $curve::SIZE
+ $curve::SIZE
+ encodePoint
+ encodePoint
+ encodePoint
+ getBasePoint
+ withSignatureFormat
+ $this->sigFormat
+ $y
+ toBigInteger
+ $Ln
+ $curve::HASH
+ $curve::SIZE
+ $curve::SIZE
+ $curve::SIZE
+ $message
+ $message
+ $order
+ $params
+ $params
+ $r
+ $rhs
+ $s
+ $sig
+ $signature
+ $signature
+ $u2
+ $w
+ $u2
+ $x1
+ $A
+ $Ln
+ $format
+ $n_1
+ $params
+ $rhs
+ $sig
+ $type
+ $w
+ $x1
+ [, $u2]
+ [, $x1]
+ bool
+ string
+ $format::load($signature)
+ $type::savePublicKey($this->curve, $this->QA, $options)
+ between
+ between
+ divide
+ divide
+ equals
+ equals
+ equals
+ getLength
+ modInverse
+ multiply
+ subtract
+ $A
+ $curve::SIZE
+ $order->getLength()
+ $type::savePublicKey($this->curve, $this->QA, $options)
+ $x1->equals($r)
+ $lhs[0]
+ $lhs[1]
+ $rhs[0]
+ $rhs[1]
+ self::$engines['libsodium']
+ PublicKey
+ PublicKey
+ PublicKey
+ PublicKey
+ PublicKey
+ PublicKey
+ !isset($this->context)
+ $this->context
+ $this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)
+ ''
+ 'SigEd25519 no Ed25519 collisions' . "\0" . chr(strlen($this->context)) . $this->context
+ $curve::HASH
+ $curve::SIZE
+ $curve::SIZE
+ $curve::SIZE
+ $curve::SIZE
+ addPoint
+ encodePoint
+ getBasePoint
+ $this->sigFormat
+ !is_string($this->key)
+ $this->key === false
+ hash($algo, $text, true)
+ is_array($algo)
+ is_array($this->algo)
+ is_string($this->key)
+ is_string($this->nonce)
+ $initial[$i]
+ $k[$i]
+ string
+ $matches[2]
+ string
+ string
+ $hash = strtolower($hash)
+ $this->hashParam
+ string
+ $x
+ function ($x) {
+ $length
+ $factory128
+ $factory36
+ $factory64
+ $marker128
+ $marker64
+ $maxwordrange128
+ $maxwordrange64
+ $offset128
+ $offset64
+ $algo($temp, ...array_values($this->parameters))
+ $algo($text, ...array_values($this->parameters))
+ $b
+ $index
+ $length
+ $m
+ $output
+ $parity[0]
+ $parity[1]
+ $parity[2]
+ $parity[3]
+ $parity[4]
+ $pi
+ $pi
+ $rotationOffsets[$j][$i]
+ $rotationOffsets[$j][$i]
+ $s[$j][$i]
+ $s[$j][$i]
+ $x
+ $y->toBytes()
+ self::$maxwordrange128
+ self::$maxwordrange64
+ self::$maxwordrange64
+ unpack('C', $index)[1] * $taglen
+ $k[$i]
+ $rotationOffsets[$j]
+ $rotationOffsets[$j]
+ $roundConstants[$round]
+ $roundConstants[$round]
+ $roundConstants[$round]
+ $s[$i][$j++]
+ $s[$i][$j++]
+ $s[$i][$j]
+ $s[$i][$j]
+ $s[$i][$j]
+ $s[$i][$j][1]
+ $s[$j][$i]
+ $s[$j][$i]
+ $s[$x][$y++]
+ $s[$x][$y]
+ $s[$x][$y][1]
+ $s[0][$i]
+ $s[0][$i]
+ $s[0][$i]
+ $s[0][0]
+ $s[0][0]
+ $s[0][0][1]
+ $s[1][$i]
+ $s[1][$i]
+ $s[1][$i]
+ $s[2][$i]
+ $s[2][$i]
+ $s[2][$i]
+ $s[3][$i]
+ $s[3][$i]
+ $s[3][$i]
+ $s[4][$i]
+ $s[4][$i]
+ $s[4][$i]
+ $st[$i][0]
+ $st[$i][0]
+ $st[$i][0][1]
+ $st[$i][1]
+ $st[$i][1]
+ $st[$i][1][1]
+ $st[$i][2]
+ $st[$i][2]
+ $st[$i][2][1]
+ $st[$i][3]
+ $st[$i][3]
+ $st[$i][3][1]
+ $st[$i][4]
+ $st[$i][4]
+ $st[$i][4][1]
+ $s[$i][$j]
+ $s[$i][$j]
+ $s[$i][$j]
+ $s[$i][0]
+ $s[$i][1]
+ $s[$i][2]
+ $s[$i][3]
+ $s[$i][4]
+ $s[$x][$y++]
+ $s[$x][$y]
+ $s[$x][$y]
+ $s[0][0]
+ $s[0][0]
+ $s[0][0]
+ $st[(2 * $i + 3 * $j) % 5][$j]
+ $st[(2 * $i + 3 * $j) % 5][$j]
+ $a
+ $a
+ $b
+ $b
+ $c
+ $c
+ $ch
+ $d
+ $d
+ $e
+ $e
+ $f
+ $f
+ $factory
+ $factory
+ $factory
+ $g
+ $g
+ $h
+ $h
+ $k
+ $k_i
+ $m
+ $m
+ $m_i
+ $maj
+ $maj
+ $marker
+ $marker
+ $offset
+ $offset
+ $output
+ $parity[]
+ $pi
+ $pi
+ $s0
+ $s0
+ $s1
+ $s1
+ $s[$i][$j]
+ $s[$i][$j][0]
+ $s[$i][$j][1]
+ $s[$x][$y++]
+ $s[$x][$y][0]
+ $s[$x][$y][1]
+ $s[0][0]
+ $s[0][0][0]
+ $s[0][0][1]
+ $subpi
+ $t1
+ $t1
+ $t1
+ $t1
+ $t2
+ $this->computedKey
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ clone $a
+ clone $b
+ clone $c
+ clone $e
+ clone $f
+ clone $g
+ clone $hash[0]
+ clone $hash[1]
+ clone $hash[2]
+ clone $hash[3]
+ clone $hash[4]
+ clone $hash[5]
+ clone $hash[6]
+ clone $hash[7]
+ $algo($output, ...array_values($this->parameters))
+ $algo($temp, ...array_values($this->parameters))
+ $algo($text, ...array_values($this->parameters))
+ call_user_func($this->algo, $this->key)
+ int
+ int
+ string
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ add
+ bitwise_and
+ bitwise_and
+ bitwise_and
+ bitwise_and
+ bitwise_and
+ bitwise_not
+ bitwise_rightRotate
+ bitwise_rightRotate
+ bitwise_rightRotate
+ bitwise_rightRotate
+ bitwise_rightRotate
+ bitwise_rightRotate
+ bitwise_xor
+ bitwise_xor
+ bitwise_xor
+ bitwise_xor
+ bitwise_xor
+ bitwise_xor
+ bitwise_xor
+ compare
+ multiply
+ multiply
+ multiply
+ multiply
+ newInteger
+ newInteger
+ newInteger
+ newInteger
+ newInteger
+ newInteger
+ subtract
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ $hash[0]->toBytes()
+ $hash[2]->toBytes()
+ $hash[3]->toBytes()
+ $hash[4]->toBytes()
+ $hash[5]->toBytes()
+ $hash[6]->toBytes()
+ $hash[7]->toBytes()
+ $hi
+ $hi
+ $lo
+ $lo
+ $parity[0]
+ $parity[0][0]
+ $parity[0][1]
+ $parity[1]
+ $parity[1][0]
+ $parity[1][1]
+ $parity[2]
+ $parity[2][0]
+ $parity[2][1]
+ $parity[3]
+ $parity[3][0]
+ $parity[3][1]
+ $parity[4]
+ $parity[4][0]
+ $parity[4][1]
+ $s[$i][$j]
+ $s[$i][$j][0]
+ $s[$i][$j][1]
+ $s[$x][$y++]
+ $s[$x][$y][0]
+ $s[$x][$y][1]
+ $s[0][$i]
+ $s[0][$i][0]
+ $s[0][$i][1]
+ $s[0][0]
+ $s[0][0][0]
+ $s[0][0][1]
+ $st[$i][0]
+ $st[$i][0][0]
+ $st[$i][0][1]
+ $st[$i][1]
+ $st[$i][1][0]
+ $st[$i][1][1]
+ $st[$i][2]
+ $st[$i][2][0]
+ $st[$i][2][1]
+ $st[$i][3]
+ $st[$i][3][0]
+ $st[$i][3][1]
+ $st[$i][4]
+ $st[$i][4][0]
+ $st[$i][4][1]
+ $this->blockSize
+ unpack('C', $index)[1]
+ ~$st[$i][0]
+ ~$st[$i][0][0]
+ ~$st[$i][0][1]
+ ~$st[$i][1]
+ ~$st[$i][1][0]
+ ~$st[$i][1][1]
+ ~$st[$i][2]
+ ~$st[$i][2][0]
+ ~$st[$i][2][1]
+ ~$st[$i][3]
+ ~$st[$i][3][0]
+ ~$st[$i][3][1]
+ ~$st[$i][4]
+ ~$st[$i][4][0]
+ ~$st[$i][4][1]
+ $this->blockSize
+ $this->blockSize >> 3
+ $y->toBytes()
+ $m[$i]
+ $m[$i]
+ $m[$i]
+ $m[$i]
+ $m[$i]
+ $output
+ $output
+ pack('N4', 0, $index, 0, 1)
+ $m_i
+ $p
+ $p
+ $pi
+ pack('N4', 0, 0, 0, $length << 3)
+ pack('P', $s[$i][$j++])
+ pack('V2', $s[$i][$j][1], $s[$i][$j++][0])
+ false
+ false
+ false
+ false
+ $pi[$i + 1]
+ $pi[$i]
+ unpack('C', $index)[1]
+ ~$st[$i][0]
+ ~$st[$i][1]
+ ~$st[$i][2]
+ ~$st[$i][3]
+ ~$st[$i][4]
+ $hash
+ $matches[2] >> 3
+ $hash[0]
+ $hash[0]
+ $hash[1]
+ $hash[1]
+ $hash[2]
+ $hash[2]
+ $hash[3]
+ $hash[3]
+ $hash[4]
+ $hash[4]
+ $hash[5]
+ $hash[5]
+ $hash[6]
+ $hash[6]
+ $hash[7]
+ $hash[7]
+ $matches[1]
+ $matches[2]
+ $parity[1]
+ $parity[1]
+ $parity[2]
+ $parity[2]
+ $parity[3]
+ $parity[3]
+ $parity[4]
+ $parity[4]
+ $rotated[0][0]
+ $rotated[0][1]
+ $rotated[1]
+ $rotated[1][1]
+ $rotated[2]
+ $rotated[2][1]
+ $rotated[3]
+ $rotated[3][1]
+ $rotated[4]
+ $rotated[4][1]
+ $s[0]
+ $s[0]
+ $s[1]
+ $s[1]
+ $s[2]
+ $s[2]
+ $s[3]
+ $s[3]
+ $s[4]
+ $s[4]
+ $st[$i][0]
+ $st[$i][0]
+ $st[$i][0][1]
+ $st[$i][1]
+ $st[$i][1]
+ $st[$i][1][1]
+ $st[$i][2]
+ $st[$i][2]
+ $st[$i][2][1]
+ $st[$i][3]
+ $st[$i][3]
+ $st[$i][3][1]
+ $st[$i][4]
+ $st[$i][4]
+ $st[$i][4][1]
+ unpack('C', $index)[1]
+ $index
+ $algo
+ $c
+ $hashParam
+ $ipad
+ $length
+ $opad
+ $pad
+ $recomputeAESKey
+ hash($this->algo, $this->key, true)
+ is_string($this->key)
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $this->blockSize
+ $b
+ sha3_32
+ sha3_64
+ sha512
+ $c
+ $c
+ $k
+ $n
+ $n
+ $num_ints
+ string
+ string
+ $key
+ AsymmetricKey
+ $key
+ $key
+ $key
+ loadParameters
+ loadPublicKey
+ pack('vvvv', $r0, $r1, $r2, $r3)
+ pack('vvvv', $r0, $r1, $r2, $r3)
+ string
+ string
+ $length >> 3
+ $t1
+ $l
+ $keys[$r0 & 0x3F]
+ $keys[$r0 & 0x3F]
+ $keys[$r1 & 0x3F]
+ $keys[$r1 & 0x3F]
+ $keys[$r2 & 0x3F]
+ $keys[$r2 & 0x3F]
+ $keys[$r3 & 0x3F]
+ $keys[$r3 & 0x3F]
+ $l[$i + $t8]
+ $l[$i + 1]
+ $l[$i]
+ $l[$i]
+ $l[$i]
+ $pitable[$l[$i + 1] ^ $l[$i + $t8]]
+ $pitable[$l[$i - 1] + $l[$i - $t]]
+ $pitable[$l[$i] & $tm]
+ self::$invpitable[$l[0]]
+ self::$pitable[$l['a']]
+ $i
+ $i
+ $l[$i]
+ $l[$i]
+ $l[$i]
+ $l[0]
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $t8
+ $this->current_key_length
+ $tm
+ $i
+ $i
+ $i
+ $keys[$j++]
+ $keys[$j++]
+ $keys[$j++]
+ $keys[$j++]
+ $keys[--$j]
+ $keys[--$j]
+ $keys[--$j]
+ $keys[--$j]
+ $l[$i + 1]
+ $l[$i - 1]
+ $l[$i]
+ $l['b']
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r0
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r1
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r2
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $r3
+ $t1
+ $t8
+ $t8
+ ($r0 + $keys[$j++] + ((($r1 ^ $r2) & $r3) ^ $r1)) & 0xFFFF
+ ($r0 ^ $r1) & $r2
+ ($r0 ^ $r1) & $r2
+ ($r1 + $keys[$j++] + ((($r2 ^ $r3) & $r0) ^ $r2)) & 0xFFFF
+ ($r1 ^ $r2) & $r3
+ ($r1 ^ $r2) & $r3
+ ($r2 + $keys[$j++] + ((($r3 ^ $r0) & $r1) ^ $r3)) & 0xFFFF
+ ($r2 ^ $r3) & $r0
+ ($r2 ^ $r3) & $r0
+ ($r3 + $keys[$j++] + ((($r0 ^ $r1) & $r2) ^ $r0)) & 0xFFFF
+ ($r3 ^ $r0) & $r1
+ ($r3 ^ $r0) & $r1
+ 8 * $t8
+ self::$pitable[$l['a']]
+ $l
+ $this->key
+ unpack('C*', $key)
+ unpack('v*', $in)
+ unpack('v*', $in)
+ pack(...$l)
+ $l['a']
+ $l['b']
+ $this->openssl_translate_mode()
+ $l[0]
+ $l['a']
+ $l['b']
+ setupInlineCrypt
+ $key_length
+ $current_key_length
+ $key
+ $keys
+ $orig_key
+ RC2
+ RC2
+ RC2
+ RC2
+ RC2
+ RC2
+ RC2
+ RC2
+ RC2
+ isset($this->key)
+ $limit === 0
+ $limit === 0
+ $limit === 0
+ $limit === 0
+ $limit === 64
+ $limit === 64
+ $limit === 64
+ $limit === 64
+ $skip_key_adjustment
+ $keyStream[($ksj + $ksi) & 255]
+ $keyStream[$i]
+ $keyStream[$j]
+ $keyStream[($ksj + $ksi) & 255]
+ $stream[0]
+ $stream[0]
+ $stream[1]
+ $stream[1]
+ $stream[2]
+ $stream[2]
+ $keyStream[$i]
+ $keyStream[$j]
+ $keyStream[$i]
+ $keyStream[$i]
+ $keyStream[$j]
+ $keyStream[$j]
+ $keyStream[($ksj + $ksi) & 255]
+ $i
+ $i
+ $i
+ $j
+ $j
+ $j
+ $keyStream
+ $keyStream
+ $keyStream[$i]
+ $keyStream[$j]
+ $ksi
+ $ksj
+ $stream
+ $i
+ $j
+ $ksj
+ $key_length
+ $key
+ $stream
+ RC4
+ RC4
+ RC4
+ RC4
+ RC4
+ RC4
+ RC4
+ RC4
+ RC4
+ $key
+ bool
+ RSA::load($privatekeystr)
+ $bits
+ $components['MGFHash']
+ $components['hash']
+ $components['saltLength']
+ $e
+ $lcm['bottom']
+ $n
+ $primes[$i]
+ $primes[$i]
+ $primes[1]
+ $regSize
+ $temp
+ $temp
+ self::$one
+ self::$one
+ $lcm['bottom']
+ $lcm['bottom']
+ $lcm['top']
+ $lcm['top']
+ $primes[$i]
+ $primes[1]
+ $primes[2]
+ $temp
+ $coefficients[$i]
+ $coefficients[2]
+ $exponents[$i]
+ $lcm['bottom']
+ $lcm['top']
+ $primes[$i]
+ $primes[$i]
+ $coefficients[$i]
+ $exponents[$i]
+ $primes[$i]
+ $primes[$i]
+ $primes[$i]
+ $primes[$i]
+ $coefficients[2]
+ $i
+ $i
+ $key->coefficients
+ $key->exponent
+ $key->exponent
+ $key->exponents
+ $key->k
+ $key->modulus
+ $key->primes
+ $lcm['bottom']
+ $lcm['top']
+ $prime
+ $privatekey->coefficients
+ $privatekey->exponents
+ $privatekey->k
+ $privatekey->primes
+ $temp
+ $temp
+ [$temp]
+ divide
+ gcd
+ getLengthInBytes
+ modInverse
+ multiply
+ subtract
+ subtract
+ $bits
+ $i
+ $t
+ RSA
+ $primes[$i]
+ $primes[$i]
+ $primes[1]
+ $rsa
+ $c
+ gcd
+ modInverse
+ subtract
+ toBytes
+ $primes[1]
+ $primes[2]
+ $components['coefficients']
+ $components['exponents']
+ $components['format']
+ $components['isPublicKey']
+ $components['modulus']
+ $components['primes']
+ $components['publicExponent']
+ self::$engines['OpenSSL']
+ self::$engines['OpenSSL']
+ $t
+ disableBlinding
+ enableBlinding
+ getEngine
+ getLabel
+ getMGFHash
+ onLoad
+ setExponent
+ setOpenSSLConfigPath
+ $exponent
+ $k
+ $modulus
+ RSA
+ !isset($this->modulus)
+ $this->modulus->getLength()
+ $key->coefficients
+ $key->exponents
+ $key->primes
+ $key->privateExponent
+ $key->publicExponent
+ $i0
+ $coefficients[2]->toBytes()
+ $exponents[1]->toBytes()
+ $exponents[2]->toBytes()
+ $key
+ $key
+ $primes[1]->toBytes()
+ $primes[2]->toBytes()
+ $components['isPublicKey']
+ $components['privateExponent']
+ $components[$components['isPublicKey'] ? 'publicExponent' : 'privateExponent']
+ $components['coefficients']
+ $components['exponents']
+ $components['exponents']
+ $components['isPublicKey']
+ $components['isPublicKey']
+ $components['modulus']
+ $components['primes']
+ $components['primes']
+ $components['privateExponent']
+ $components['publicExponent']
+ $components['publicExponent']
+ array
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ $components
+ $components
+ unpack('Vmagic/Vbitlen/a4pubexp', Strings::shift($key, 12))
+ unpack('atype/aversion/vreserved/Valgo', Strings::shift($key, 8))
+ $key
+ $key
+ pack('VVa*', self::RSA1, 8 * strlen($n), $e)
+ pack('VVa*', self::RSA2, 8 * strlen($n), $e)
+ $bitlen / 16
+ $bitlen / 16
+ $bitlen / 16
+ $bitlen / 16
+ $bitlen / 16
+ $bitlen / 8
+ $bitlen / 8
+ $coefficients[2]
+ $exponents[1]
+ $exponents[2]
+ $primes[1]
+ $primes[2]
+ !empty($password) && is_string($password)
+ is_string($password)
+ is_string($key)
+ MSBLOB
+ $d
+ $e
+ $e
+ $n
+ $n
+ $coefficients[2]
+ $parsed['paddedKey']
+ $parsed['paddedKey']
+ $parsed['publicKey']
+ $primes[1]
+ $primes[2]
+ $comment
+ $exponents[]
+ $temp
+ $temp
+ modInverse
+ modInverse
+ subtract
+ subtract
+ $comment
+ $coefficients[2]
+ $primes[1]
+ $primes[2]
+ $parsed['comment']
+ $parsed['publicKey']
+ $parsed['type']
+ $parsed[type]
+ savePrivateKey
+ $types
+ $decoded[0]
+ $decoded[0]
+ $primeInfo['coefficient']
+ $primeInfo['exponent']
+ $primeInfo['prime']
+ $components['coefficients'][]
+ $components['exponents'][]
+ $components['primes'][]
+ $components['coefficients'][]
+ $components['exponents'][]
+ $components['primes'][]
+ $primeInfo
+ $key
+ $coefficients[2]
+ $decoded[0]
+ $exponents[1]
+ $exponents[2]
+ $primes[1]
+ $primes[2]
+ $key['coefficient']
+ $key['exponent1']
+ $key['exponent2']
+ $key['modulus']
+ $key['otherPrimeInfos']
+ $key['prime1']
+ $key['prime2']
+ $key['privateExponent']
+ $key['publicExponent']
+ $key['version']
+ $key[$type . 'Key']
+ $result['meta']
+ savePrivateKey
+ $options
+ $childOIDsLoaded
+ $params['hashAlgorithm']
+ $params['maskGenAlgorithm']
+ new ASN1\Element(ASN1::encodeDER($params, Maps\RSASSA_PSS_params::MAP))
+ string
+ $decoded[0]
+ $decoded[0]
+ $key[$type . 'Key']
+ $key[$type . 'KeyAlgorithm']['parameters']
+ $options['saltLength']
+ $params['hashAlgorithm']['algorithm']
+ $params['maskGenAlgorithm']['parameters']
+ $params['maskGenAlgorithm']['parameters']['algorithm']
+ $key[$type . 'KeyAlgorithm']['parameters']
+ $params['hashAlgorithm']['algorithm']
+ $params['maskGenAlgorithm']['parameters']
+ $params['hashAlgorithm']['algorithm']
+ $result['meta']
+ toString
+ $options['MGFHash']
+ $options['hash']
+ $params['hashAlgorithm']
+ $params['maskGenAlgorithm']
+ $params['hashAlgorithm']
+ $params['maskGenAlgorithm']
+ $params['hashAlgorithm']
+ $params['maskGenAlgorithm']
+ toString
+ $params['hashAlgorithm']['algorithm']
+ $params['maskGenAlgorithm']['parameters']['algorithm']
+ $params['hashAlgorithm']
+ $params['maskGenAlgorithm']
+ $params['hashAlgorithm']
+ $params
+ $params
+ $params
+ $params
+ $decoded[0]
+ $decoded[0]
+ toString
+ $key[$type . 'Key']
+ $key[$type . 'KeyAlgorithm']
+ $params['hashAlgorithm']
+ $params['maskGenAlgorithm']
+ savePrivateKey
+ savePublicKey
+ $childOIDsLoaded
+ $decoded === false
+ $decoded === false
+ $params
+ $params
+ $params
+ $params
+ $params
+ $params
+ $params
+ $d
+ $e
+ $e
+ $n
+ $n
+ $coefficients[2]
+ $primes[1]
+ $primes[2]
+ $components['public']
+ $exponents[]
+ $temp
+ $temp
+ modInverse
+ modInverse
+ subtract
+ subtract
+ $private
+ $public
+ $coefficients[2]
+ $primes[1]
+ $primes[2]
+ savePrivateKey
+ savePublicKey
+ $types
+ $result === false
+ $result === false
+ function ($var) {
+ function ($var) {
+ function ($var) {
+ $components['primes'][1]
+ $components['primes'][1]
+ $components['primes'][2]
+ $components['primes'][2]
+ $components['coefficients']
+ $components['exponents']
+ $components['modulus']
+ $components['primes']
+ $components['privateExponent']
+ $components['publicExponent']
+ $exponents[]
+ $temp
+ $temp
+ clone $var
+ clone $var
+ clone $var
+ modInverse
+ modInverse
+ modInverse
+ subtract
+ subtract
+ !empty($password) && is_string($password)
+ is_string($password)
+ Raw
+ $key
+ $coefficients[2]->toBytes()
+ $exponents[1]->toBytes()
+ $exponents[2]->toBytes()
+ $primes[1]->toBytes()
+ $primes[2]->toBytes()
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ toBytes
+ $temp->item(0)->nodeValue
+ $temp->item(0)->nodeValue
+ $coefficients[2]
+ $exponents[1]
+ $exponents[2]
+ $primes[1]
+ $primes[2]
+ !empty($password) && is_string($password)
+ is_string($password)
+ Strings::is_stringable($key)
+ XML
+ $em[0]
+ $em[0]
+ $em[1]
+ !$hashesMatch
+ $m[$i] === "\0"
+ $m[$i] === "\1"
+ $this->rsassa_pkcs1_v1_5_sign($message)
+ $this->rsassa_pss_sign($message)
+ string
+ $em
+ $publicExponent
+ $em[0]
+ $em[0]
+ $em[1]
+ $key
+ $r
+ $r->multiply($h)
+ $smallest->subtract(self::$one)
+ $this->coefficients[$i]
+ $this->coefficients[$i]
+ $this->coefficients[2]
+ $this->coefficients[2]
+ $this->exponents[$i]
+ $this->exponents[$i]
+ $this->exponents[1]
+ $this->exponents[2]
+ $this->primes[$i - 1]
+ $this->primes[$i]
+ $this->primes[$i]
+ $this->primes[$i]
+ $this->primes[$i]
+ $this->primes[$i]
+ $this->primes[$i]
+ $this->primes[$i]
+ $this->primes[1]
+ $this->primes[1]
+ $this->primes[1]
+ $this->primes[2]
+ $this->primes[2]
+ $this->primes[2]
+ $this->publicExponent
+ $key
+ $r
+ $r
+ $r
+ $smallest
+ $smallest
+ $type
+ $type
+ string
+ $type::savePrivateKey($this->modulus, $this->publicExponent, $this->exponent, $this->primes, $this->exponents, $this->coefficients, $this->password, $options)
+ $type::savePublicKey($this->modulus, $this->exponent, $options)
+ $type::savePublicKey($this->modulus, $this->publicExponent)
+ compare
+ equals
+ equals
+ equals
+ multiply
+ multiply
+ subtract
+ $type::savePrivateKey($this->modulus, $this->publicExponent, $this->exponent, $this->primes, $this->exponents, $this->coefficients, $this->password, $options)
+ $type::savePublicKey($this->modulus, $this->exponent, $options)
+ strpos($em, chr(0), 2)
+ $em
+ $em
+ $em
+ $em
+ $this->coefficients[2]
+ $this->coefficients[2]
+ $this->coefficients[2]
+ $this->exponents[1]
+ $this->exponents[1]
+ $this->exponents[2]
+ $this->primes[1]
+ $this->primes[1]
+ $this->primes[1]
+ $this->primes[2]
+ $this->primes[2]
+ $coefficients
+ $exponents
+ $primes
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ PrivateKey
+ $y
+ false
+ false
+ false
+ false
+ $c
+ $this->rsassa_pss_verify($message, $signature)
+ hash_equals($h, $h2)
+ bool
+ string
+ string
+ $decoded[0]
+ $em2
+ $hash
+ $decoded['digestAlgorithm']['algorithm']
+ $decoded[0]['length']
+ $oids[$decoded['digestAlgorithm']['algorithm']]
+ $em2
+ $hash
+ $type
+ string
+ $type::savePublicKey($this->modulus, $this->publicExponent, $options)
+ $type::savePublicKey($this->modulus, $this->publicExponent, $options)
+ $em
+ $em
+ $em
+ $em
+ $decoded['digest']
+ $decoded['digestAlgorithm']
+ $decoded['digest']
+ $decoded['digestAlgorithm']
+ $decoded['digest']
+ $decoded['digestAlgorithm']
+ $r1
+ $r2
+ PublicKey
+ PublicKey
+ PublicKey
+ PublicKey
+ !is_array($decoded)
+ $decoded
+ $decoded
+ $decoded
+ $decoded
+ $this->publicExponent
+ $pkcs15_compat
+ $length
+ 0
+ 1
+ $arr
+ $_SESSION['count']
+ $_SESSION['count']
+ $_SESSION['count']
+ $_SESSION['seed']
+ $_SESSION['count']
+ $i
+ $r
+ $v
+ encrypt
+ encrypt
+ encrypt
+ $_SESSION['count']
+ $i
+ $r
+ $r
+ $old_session_id
+ $old_use_cookies
+ isset($_COOKIE)
+ isset($_GET)
+ isset($_POST)
+ isset($_SERVER)
+ ''
+ ''
+ ''
+ ''
+ $this->oldtag === false
+ $this->oldtag === false
+ pack('N*', ...$temp)
+ pack('N*', ...$temp)
+ string
+ string
+ string
+ 0x000000FF
+ 0x000000FF
+ 0x000000FF
+ 0x000000FF
+ 8
+ 16
+ 24
+ $col
+ $temp
+ $temp
+ $this->w[$row][$j]
+ $dt0[$dw >> 24 & 0x000000FF]
+ $dt0[$state[$i] >> 24 & 0x000000FF]
+ $dt1[$dw >> 16 & 0x000000FF]
+ $dt1[$state[$j] >> 16 & 0x000000FF]
+ $dt2[$dw >> 8 & 0x000000FF]
+ $dt2[$state[$k] >> 8 & 0x000000FF]
+ $dt3[$dw & 0x000000FF]
+ $dt3[$state[$l] & 0x000000FF]
+ $invtables[0]
+ $invtables[1]
+ $invtables[2]
+ $invtables[3]
+ $invtables[4]
+ $isbox[$word & 0x000000FF]
+ $isbox[$word >> 8 & 0x000000FF]
+ $isbox[$word >> 16 & 0x000000FF]
+ $isbox[$word >> 24 & 0x000000FF]
+ $rcon[$i / $this->Nk]
+ $sbox[$state[$i] & 0x000000FF]
+ $sbox[$state[$i] >> 8 & 0x000000FF]
+ $sbox[$state[$i] >> 16 & 0x000000FF]
+ $sbox[$state[$i] >> 24 & 0x000000FF]
+ $sbox[$word & 0x000000FF]
+ $sbox[$word >> 8 & 0x000000FF]
+ $sbox[$word >> 16 & 0x000000FF]
+ $sbox[$word >> 24 & 0x000000FF]
+ $t0[$state[$i] >> 24 & 0x000000FF]
+ $t1[$state[$j] >> 16 & 0x000000FF]
+ $t2[$state[$k] >> 8 & 0x000000FF]
+ $t3[$state[$l] & 0x000000FF]
+ $tables[0]
+ $tables[1]
+ $tables[2]
+ $tables[3]
+ $tables[4]
+ $dt0[]
+ $dt1[]
+ $dt2[]
+ $t0[]
+ $t1[]
+ $t2[]
+ $dt0[$state[$i] >> 24 & 0x000000FF]
+ $dt1[$state[$j] >> 16 & 0x000000FF]
+ $dt2[$state[$k] >> 8 & 0x000000FF]
+ $dt3[$state[$l] & 0x000000FF]
+ $isbox[$word & 0x000000FF]
+ $isbox[$word >> 8 & 0x000000FF]
+ $isbox[$word >> 16 & 0x000000FF]
+ $isbox[$word >> 24 & 0x000000FF]
+ $sbox[$state[$i] & 0x000000FF]
+ $sbox[$state[$i] >> 8 & 0x000000FF]
+ $sbox[$state[$i] >> 16 & 0x000000FF]
+ $sbox[$state[$i] >> 24 & 0x000000FF]
+ $state[$j]
+ $state[$j]
+ $state[$j]
+ $state[$j]
+ $state[$k]
+ $state[$k]
+ $state[$k]
+ $state[$k]
+ $state[$l]
+ $state[$l]
+ $state[$l]
+ $state[$l]
+ $t0[$state[$i] >> 24 & 0x000000FF]
+ $t1[$state[$j] >> 16 & 0x000000FF]
+ $t2[$state[$k] >> 8 & 0x000000FF]
+ $t3[$state[$l] & 0x000000FF]
+ $dt0
+ $dt1
+ $dt2
+ $dt3
+ $dw[]
+ $isbox
+ $j
+ $j
+ $j
+ $j
+ $j
+ $j
+ $j
+ $j
+ $k
+ $k
+ $k
+ $k
+ $k
+ $k
+ $k
+ $k
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $l
+ $sbox
+ $state[$i]
+ $state[]
+ $state[]
+ $t0
+ $t1
+ $t2
+ $t3
+ $temp
+ $temp
+ $temp
+ $temp[$i]
+ $temp[$i]
+ $temp[$i]
+ $temp[$i]
+ $temp[$j]
+ $w[$i]
+ $w[]
+ $wc
+ $word
+ $word
+ $word
+ array
+ array
+ array
+ $Nb + $i - $c[1]
+ $Nb + $i - $c[1]
+ $Nb + $i - $c[2]
+ $Nb + $i - $c[2]
+ $Nb + $i - $c[3]
+ $Nb + $i - $c[3]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $dt0[$dw >> 24 & 0x000000FF]
+ $dt0[$state[$i] >> 24 & 0x000000FF]
+ $dw[$i]
+ $dw[$i]
+ $dw[++$wc]
+ $dw[++$wc]
+ $i + $c[1]
+ $i + $c[1]
+ $i + $c[2]
+ $i + $c[2]
+ $i + $c[3]
+ $i + $c[3]
+ $isbox[$word & 0x000000FF]
+ $isbox[$word >> 8 & 0x000000FF]
+ $isbox[$word >> 16 & 0x000000FF]
+ $isbox[$word >> 24 & 0x000000FF]
+ $j
+ $j
+ $j
+ $j
+ $k
+ $k
+ $k
+ $k
+ $l
+ $l
+ $l
+ $l
+ $rcon[$i / $this->Nk]
+ $sbox[$state[$i] & 0x000000FF]
+ $sbox[$state[$i] >> 8 & 0x000000FF]
+ $sbox[$state[$i] >> 16 & 0x000000FF]
+ $sbox[$state[$i] >> 24 & 0x000000FF]
+ $sbox[$word & 0x000000FF]
+ $sbox[$word >> 8 & 0x000000FF]
+ $sbox[$word >> 16 & 0x000000FF]
+ $sbox[$word >> 24 & 0x000000FF]
+ $state[$i]
+ $state[$i]
+ $state[$i]
+ $state[$i]
+ $state[$i]
+ $state[$i]
+ $state[$i]
+ $state[$i]
+ $state[$j]
+ $state[$j]
+ $state[$j]
+ $state[$j]
+ $state[$k]
+ $state[$k]
+ $state[$k]
+ $state[$k]
+ $state[$l]
+ $state[$l]
+ $state[$l]
+ $state[$l]
+ $t0[$state[$i] >> 24 & 0x000000FF]
+ $temp
+ $temp
+ $w[$i - $this->Nk]
+ $w[$i]
+ $w[++$wc]
+ $w[++$wc]
+ $word
+ $word
+ $word
+ $word
+ $word
+ $word
+ ($Nb + $i - $c[1]) % $Nb
+ ($Nb + $i - $c[1]) % $Nb
+ ($Nb + $i - $c[2]) % $Nb
+ ($Nb + $i - $c[2]) % $Nb
+ ($Nb + $i - $c[3]) % $Nb
+ ($Nb + $i - $c[3]) % $Nb
+ ($i + $c[1]) % $Nb
+ ($i + $c[1]) % $Nb
+ ($i + $c[2]) % $Nb
+ ($i + $c[2]) % $Nb
+ ($i + $c[3]) % $Nb
+ ($i + $c[3]) % $Nb
+ ($temp << 8) & 0xFFFFFF00
+ $tables
+ $tables
+ unpack('N*words', $this->key)
+ $words
+ $words
+ false
+ false
+ $this->openssl_translate_mode()
+ $w
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[1]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[2]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $c[3]
+ $invtables[0]
+ $invtables[1]
+ $invtables[2]
+ $invtables[3]
+ $invtables[4]
+ $tables[0]
+ $tables[1]
+ $tables[2]
+ $tables[3]
+ $tables[4]
+ $this->w[0]
+ $this->kl['block_size']
+ $this->kl['key_length']
+ $dt0
+ $dt1
+ $dt2
+ $t0
+ $t1
+ $t2
+ setBlockLength
+ setupInlineCrypt
+ $Nr
+ $c
+ $dw
+ $kl
+ $w
+ Rijndael
+ Rijndael
+ Rijndael
+ Rijndael
+ Rijndael
+ Rijndael
+ Rijndael
+ Rijndael
+ Rijndael
+ (int)0xFF000000
+ (int)0xFF000000
+ is_string($this->iv)
+ $this->key === false
+ $this->key === false
+ $this->nonce === false
+ $this->nonce === false
+ $this->oldtag === false
+ string
+ salsa20
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $key
+ $temp
+ $z[10]
+ $z[11]
+ $z[12]
+ $z[13]
+ $z[14]
+ $z[15]
+ $z[16]
+ $z[1]
+ $z[2]
+ $z[3]
+ $z[4]
+ $z[5]
+ $z[6]
+ $z[7]
+ $z[8]
+ $z[9]
+ $block
+ $block
+ $block
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $temp
+ $x[$i]
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $x[$i]
+ static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2)
+ static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2)
+ static::salsa20($this->p1 . pack('V', $i++) . $this->p2)
+ $encrypted
+ $this->p1
+ $this->p1
+ $this->p1
+ $this->p1
+ $this->p2
+ $this->p2
+ $this->p2
+ $this->p2
+ $this->p2
+ $this->p2
+ $this->p2
+ pack('V', $buffer['counter'])
+ pack('V', $buffer['counter'])
+ pack('V', $buffer['counter']++)
+ pack('V', $buffer['counter']++)
+ pack('V', $buffer['counter']++)
+ pack('V', $i++)
+ pack('V', $this->counter)
+ pack('V', strlen($text))
+ pack('V', strlen($this->aad))
+ false
+ false
+ $x[$i]
+ $z[$i]
+ $z[10]
+ $z[11]
+ $z[12]
+ $z[13]
+ $z[14]
+ $z[15]
+ $z[16]
+ $z[1]
+ $z[2]
+ $z[3]
+ $z[4]
+ $z[5]
+ $z[6]
+ $z[7]
+ $z[8]
+ $z[9]
+ $x[$i]
+ $z[10]
+ $z[11]
+ $z[12]
+ $z[13]
+ $z[14]
+ $z[15]
+ $z[16]
+ $z[1]
+ $z[2]
+ $z[3]
+ $z[4]
+ $z[5]
+ $z[6]
+ $z[7]
+ $z[8]
+ $z[9]
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['ciphertext']
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $buffer['counter']
+ $debuffer
+ $enbuffer
+ Salsa20
+ Salsa20
+ Salsa20
+ Salsa20
+ Salsa20
+ Salsa20
+ Salsa20
+ Salsa20
+ $this->usePoly1305 && !isset($this->poly1305Key)
+ isset($this->poly1305Key)
+ isset($this->poly1305Key)
+ $key
+ 24
+ string
+ decrypt
+ decrypt
+ decrypt
+ disableContinuousBuffer
+ disableContinuousBuffer
+ disableContinuousBuffer
+ enableContinuousBuffer
+ enableContinuousBuffer
+ enableContinuousBuffer
+ encrypt
+ encrypt
+ encrypt
+ setIV
+ setIV
+ setIV
+ setKey
+ setKey
+ setKey
+ setPreferredEngine
+ setPreferredEngine
+ setPreferredEngine
+ setupKey
+ setupKey
+ setupKey
+ $mode
+ $this->des[0]
+ $this->des[0]
+ $this->des[0]
+ $this->des[0]
+ $this->des[0]
+ $this->des[0]
+ $this->des[0]
+ $this->des[0]
+ $this->des[1]
+ $this->des[1]
+ $this->des[1]
+ $this->des[1]
+ $this->des[1]
+ $this->des[1]
+ $this->des[1]
+ $this->des[1]
+ $this->des[2]
+ $this->des[2]
+ $this->des[2]
+ $this->des[2]
+ $this->des[2]
+ $this->des[2]
+ $this->des[2]
+ $this->des[2]
+ $des
+ $mode_3cbc
+ TripleDES
+ TripleDES
+ TripleDES
+ TripleDES
+ TripleDES
+ TripleDES
+ TripleDES
+ TripleDES
+ TripleDES
+ BadModeException
+ string
+ string
+ $A + $B
+ $A + $B
+ $A + $B
+ $A + $B
+ $A + $B
+ $A + $B
+ $le_longs[1]
+ $le_longs[1]
+ $le_longs[1]
+ $le_longs[2]
+ $le_longs[2]
+ $le_longs[2]
+ $le_longs[3]
+ $le_longs[3]
+ $le_longs[3]
+ $le_longs[4]
+ $le_longs[4]
+ $le_longs[4]
+ $le_longs[5]
+ $le_longs[5]
+ $le_longs[6]
+ $le_longs[6]
+ $le_longs[7]
+ $le_longs[8]
+ $t0 + $t1 + $K[++$ki]
+ $t0 + $t1 + $K[++$ki]
+ $t0 + $t1 + $K[--$ki]
+ $t0 + $t1 + $K[--$ki]
+ $t0 + ($t1 << 1) + $K[++$ki]
+ $t0 + ($t1 << 1) + $K[++$ki]
+ $t0 + ($t1 << 1) + $K[--$ki]
+ $t0 + ($t1 << 1) + $K[--$ki]
+ $S0[ $R0 & 0xff]
+ $S0[ $R2 & 0xff]
+ $S0[$R0 & 0xff]
+ $S0[$R1 >> 24 & 0xff]
+ $S0[$R2 & 0xff]
+ $S0[$R3 >> 24 & 0xff]
+ $S0[($R1 >> 24) & 0xff]
+ $S0[($R3 >> 24) & 0xff]
+ $S1[ $R1 & 0xff]
+ $S1[ $R3 & 0xff]
+ $S1[$R0 >> 8 & 0xff]
+ $S1[$R1 & 0xff]
+ $S1[$R2 >> 8 & 0xff]
+ $S1[$R3 & 0xff]
+ $S1[($R0 >> 8) & 0xff]
+ $S1[($R2 >> 8) & 0xff]
+ $S2[$R0 >> 16 & 0xff]
+ $S2[$R1 >> 8 & 0xff]
+ $S2[$R2 >> 16 & 0xff]
+ $S2[$R3 >> 8 & 0xff]
+ $S2[($R0 >> 16) & 0xff]
+ $S2[($R1 >> 8) & 0xff]
+ $S2[($R2 >> 16) & 0xff]
+ $S2[($R3 >> 8) & 0xff]
+ $S3[$R0 >> 24 & 0xff]
+ $S3[$R1 >> 16 & 0xff]
+ $S3[$R2 >> 24 & 0xff]
+ $S3[$R3 >> 16 & 0xff]
+ $S3[($R0 >> 24) & 0xff]
+ $S3[($R1 >> 16) & 0xff]
+ $S3[($R2 >> 24) & 0xff]
+ $S3[($R3 >> 16) & 0xff]
+ $m0[$q0[$q0[$i] ^ $key[ 9]] ^ $key[1]]
+ $m0[$q0[$q0[$i] ^ $s4] ^ $s0]
+ $m0[$q0[$q0[$j] ^ $key[13]] ^ $key[5]]
+ $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]] ^ $key[1]]
+ $m0[$q0[$q0[$q1[$i] ^ $s8] ^ $s4] ^ $s0]
+ $m0[$q0[$q0[$q1[$j] ^ $key[21]] ^ $key[13]] ^ $key[5]]
+ $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]] ^ $key[1]]
+ $m0[$q0[$q0[$q1[$q1[$i] ^ $sc] ^ $s8] ^ $s4] ^ $s0]
+ $m0[$q0[$q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]] ^ $key[13]] ^ $key[5]]
+ $m1[$q0[$q1[$i] ^ $key[10]] ^ $key[2]]
+ $m1[$q0[$q1[$i] ^ $s5] ^ $s1]
+ $m1[$q0[$q1[$j] ^ $key[14]] ^ $key[6]]
+ $m1[$q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]] ^ $key[2]]
+ $m1[$q0[$q1[$q1[$i] ^ $s9] ^ $s5] ^ $s1]
+ $m1[$q0[$q1[$q1[$j] ^ $key[22]] ^ $key[14]] ^ $key[6]]
+ $m1[$q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]] ^ $key[2]]
+ $m1[$q0[$q1[$q1[$q0[$i] ^ $sd] ^ $s9] ^ $s5] ^ $s1]
+ $m1[$q0[$q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]] ^ $key[14]] ^ $key[6]]
+ $m2[$q1[$q0[$i] ^ $key[11]] ^ $key[3]]
+ $m2[$q1[$q0[$i] ^ $s6] ^ $s2]
+ $m2[$q1[$q0[$j] ^ $key[15]] ^ $key[7]]
+ $m2[$q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]] ^ $key[3]]
+ $m2[$q1[$q0[$q0[$i] ^ $sa] ^ $s6] ^ $s2]
+ $m2[$q1[$q0[$q0[$j] ^ $key[23]] ^ $key[15]] ^ $key[7]]
+ $m2[$q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]] ^ $key[3]]
+ $m2[$q1[$q0[$q0[$q0[$i] ^ $se] ^ $sa] ^ $s6] ^ $s2]
+ $m2[$q1[$q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]] ^ $key[15]] ^ $key[7]]
+ $m3[$q1[$q1[$i] ^ $key[12]] ^ $key[4]]
+ $m3[$q1[$q1[$i] ^ $s7] ^ $s3]
+ $m3[$q1[$q1[$j] ^ $key[16]] ^ $key[8]]
+ $m3[$q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]] ^ $key[4]]
+ $m3[$q1[$q1[$q0[$i] ^ $sb] ^ $s7] ^ $s3]
+ $m3[$q1[$q1[$q0[$j] ^ $key[24]] ^ $key[16]] ^ $key[8]]
+ $m3[$q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]] ^ $key[4]]
+ $m3[$q1[$q1[$q0[$q1[$i] ^ $sf] ^ $sb] ^ $s7] ^ $s3]
+ $m3[$q1[$q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]] ^ $key[16]] ^ $key[8]]
+ $q0[$q0[$i] ^ $key[ 9]]
+ $q0[$q0[$i] ^ $key[19]]
+ $q0[$q0[$i] ^ $key[27]]
+ $q0[$q0[$i] ^ $s4]
+ $q0[$q0[$i] ^ $sa]
+ $q0[$q0[$i] ^ $se]
+ $q0[$q0[$j] ^ $key[13]]
+ $q0[$q0[$j] ^ $key[23]]
+ $q0[$q0[$j] ^ $key[31]]
+ $q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]]
+ $q0[$q0[$q0[$i] ^ $se] ^ $sa]
+ $q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]]
+ $q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]]
+ $q0[$q0[$q1[$i] ^ $s8] ^ $s4]
+ $q0[$q0[$q1[$j] ^ $key[21]] ^ $key[13]]
+ $q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]]
+ $q0[$q0[$q1[$q1[$i] ^ $sc] ^ $s8] ^ $s4]
+ $q0[$q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]] ^ $key[13]]
+ $q0[$q1[$i] ^ $key[10]]
+ $q0[$q1[$i] ^ $key[17]]
+ $q0[$q1[$i] ^ $key[28]]
+ $q0[$q1[$i] ^ $s5]
+ $q0[$q1[$i] ^ $s8]
+ $q0[$q1[$i] ^ $sf]
+ $q0[$q1[$j] ^ $key[14]]
+ $q0[$q1[$j] ^ $key[21]]
+ $q0[$q1[$j] ^ $key[32]]
+ $q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]]
+ $q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]]
+ $q0[$q1[$q1[$i] ^ $s9] ^ $s5]
+ $q0[$q1[$q1[$i] ^ $sc] ^ $s8]
+ $q0[$q1[$q1[$j] ^ $key[22]] ^ $key[14]]
+ $q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]]
+ $q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]]
+ $q0[$q1[$q1[$q0[$i] ^ $sd] ^ $s9] ^ $s5]
+ $q0[$q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]] ^ $key[14]]
+ $q1[$q0[$i] ^ $key[11]]
+ $q1[$q0[$i] ^ $key[20]]
+ $q1[$q0[$i] ^ $key[26]]
+ $q1[$q0[$i] ^ $s6]
+ $q1[$q0[$i] ^ $sb]
+ $q1[$q0[$i] ^ $sd]
+ $q1[$q0[$j] ^ $key[15]]
+ $q1[$q0[$j] ^ $key[24]]
+ $q1[$q0[$j] ^ $key[30]]
+ $q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]]
+ $q1[$q0[$q0[$i] ^ $sa] ^ $s6]
+ $q1[$q0[$q0[$j] ^ $key[23]] ^ $key[15]]
+ $q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]]
+ $q1[$q0[$q0[$q0[$i] ^ $se] ^ $sa] ^ $s6]
+ $q1[$q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]] ^ $key[15]]
+ $q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]]
+ $q1[$q0[$q1[$i] ^ $sf] ^ $sb]
+ $q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]]
+ $q1[$q1[$i] ^ $key[12]]
+ $q1[$q1[$i] ^ $key[18]]
+ $q1[$q1[$i] ^ $key[25]]
+ $q1[$q1[$i] ^ $s7]
+ $q1[$q1[$i] ^ $s9]
+ $q1[$q1[$i] ^ $sc]
+ $q1[$q1[$j] ^ $key[16]]
+ $q1[$q1[$j] ^ $key[22]]
+ $q1[$q1[$j] ^ $key[29]]
+ $q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]]
+ $q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]]
+ $q1[$q1[$q0[$i] ^ $sb] ^ $s7]
+ $q1[$q1[$q0[$i] ^ $sd] ^ $s9]
+ $q1[$q1[$q0[$j] ^ $key[24]] ^ $key[16]]
+ $q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]]
+ $q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]]
+ $q1[$q1[$q0[$q1[$i] ^ $sf] ^ $sb] ^ $s7]
+ $q1[$q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]] ^ $key[16]]
+ $A
+ $A
+ $A
+ $B
+ $B
+ $B
+ $B
+ $B
+ $B
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $S0[$i]
+ $S0[$i]
+ $S0[$i]
+ $S1[$i]
+ $S1[$i]
+ $S1[$i]
+ $S2[$i]
+ $S2[$i]
+ $S2[$i]
+ $S3[$i]
+ $S3[$i]
+ $S3[$i]
+ $t0
+ $t0
+ $t0
+ $t0
+ $t1
+ $t1
+ $t1
+ $t1
+ $A
+ $A
+ $A
+ $B
+ $B
+ $B
+ $B
+ $B
+ $B
+ $B
+ $B
+ $B
+ $K[++$ki]
+ $K[++$ki]
+ $K[++$ki]
+ $K[++$ki]
+ $K[--$ki]
+ $K[--$ki]
+ $K[--$ki]
+ $K[--$ki]
+ $K[0]
+ $K[0]
+ $K[0]
+ $K[0]
+ $K[1]
+ $K[1]
+ $K[1]
+ $K[1]
+ $K[2]
+ $K[2]
+ $K[2]
+ $K[2]
+ $K[3]
+ $K[3]
+ $K[3]
+ $K[3]
+ $K[4]
+ $K[4]
+ $K[4]
+ $K[4]
+ $K[5]
+ $K[5]
+ $K[5]
+ $K[5]
+ $K[6]
+ $K[6]
+ $K[6]
+ $K[6]
+ $K[7]
+ $K[7]
+ $K[7]
+ $K[7]
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R0
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R1
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R2
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $R3
+ $S0[ $R0 & 0xff]
+ $S0[ $R2 & 0xff]
+ $S0[$R0 & 0xff]
+ $S0[$R1 >> 24 & 0xff]
+ $S0[$R2 & 0xff]
+ $S0[$R3 >> 24 & 0xff]
+ $S0[($R1 >> 24) & 0xff]
+ $S0[($R3 >> 24) & 0xff]
+ $m0[$q0[$q0[$i] ^ $key[ 9]] ^ $key[1]]
+ $m0[$q0[$q0[$j] ^ $key[13]] ^ $key[5]]
+ $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]] ^ $key[1]]
+ $m0[$q0[$q0[$q1[$j] ^ $key[21]] ^ $key[13]] ^ $key[5]]
+ $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]] ^ $key[1]]
+ $m0[$q0[$q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]] ^ $key[13]] ^ $key[5]]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$i]
+ $q0[$j]
+ $q0[$j]
+ $q0[$j]
+ $q0[$j]
+ $q0[$j]
+ $q0[$j]
+ $q0[$q0[$i] ^ $key[ 9]]
+ $q0[$q0[$i] ^ $key[19]]
+ $q0[$q0[$i] ^ $key[27]]
+ $q0[$q0[$i] ^ $s4]
+ $q0[$q0[$i] ^ $sa]
+ $q0[$q0[$i] ^ $se]
+ $q0[$q0[$j] ^ $key[13]]
+ $q0[$q0[$j] ^ $key[23]]
+ $q0[$q0[$j] ^ $key[31]]
+ $q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]]
+ $q0[$q0[$q0[$i] ^ $se] ^ $sa]
+ $q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]]
+ $q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]]
+ $q0[$q0[$q1[$i] ^ $s8] ^ $s4]
+ $q0[$q0[$q1[$j] ^ $key[21]] ^ $key[13]]
+ $q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]]
+ $q0[$q0[$q1[$q1[$i] ^ $sc] ^ $s8] ^ $s4]
+ $q0[$q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]] ^ $key[13]]
+ $q0[$q1[$i] ^ $key[10]]
+ $q0[$q1[$i] ^ $key[17]]
+ $q0[$q1[$i] ^ $key[28]]
+ $q0[$q1[$i] ^ $s5]
+ $q0[$q1[$i] ^ $s8]
+ $q0[$q1[$i] ^ $sf]
+ $q0[$q1[$j] ^ $key[14]]
+ $q0[$q1[$j] ^ $key[21]]
+ $q0[$q1[$j] ^ $key[32]]
+ $q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]]
+ $q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]]
+ $q0[$q1[$q1[$i] ^ $s9] ^ $s5]
+ $q0[$q1[$q1[$i] ^ $sc] ^ $s8]
+ $q0[$q1[$q1[$j] ^ $key[22]] ^ $key[14]]
+ $q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]]
+ $q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]]
+ $q0[$q1[$q1[$q0[$i] ^ $sd] ^ $s9] ^ $s5]
+ $q0[$q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]] ^ $key[14]]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$i]
+ $q1[$j]
+ $q1[$j]
+ $q1[$j]
+ $q1[$j]
+ $q1[$j]
+ $q1[$j]
+ $q1[$q0[$i] ^ $key[11]]
+ $q1[$q0[$i] ^ $key[20]]
+ $q1[$q0[$i] ^ $key[26]]
+ $q1[$q0[$i] ^ $s6]
+ $q1[$q0[$i] ^ $sb]
+ $q1[$q0[$i] ^ $sd]
+ $q1[$q0[$j] ^ $key[15]]
+ $q1[$q0[$j] ^ $key[24]]
+ $q1[$q0[$j] ^ $key[30]]
+ $q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]]
+ $q1[$q0[$q0[$i] ^ $sa] ^ $s6]
+ $q1[$q0[$q0[$j] ^ $key[23]] ^ $key[15]]
+ $q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]]
+ $q1[$q0[$q0[$q0[$i] ^ $se] ^ $sa] ^ $s6]
+ $q1[$q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]] ^ $key[15]]
+ $q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]]
+ $q1[$q0[$q1[$i] ^ $sf] ^ $sb]
+ $q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]]
+ $q1[$q1[$i] ^ $key[12]]
+ $q1[$q1[$i] ^ $key[18]]
+ $q1[$q1[$i] ^ $key[25]]
+ $q1[$q1[$i] ^ $s7]
+ $q1[$q1[$i] ^ $s9]
+ $q1[$q1[$i] ^ $sc]
+ $q1[$q1[$j] ^ $key[16]]
+ $q1[$q1[$j] ^ $key[22]]
+ $q1[$q1[$j] ^ $key[29]]
+ $q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]]
+ $q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]]
+ $q1[$q1[$q0[$i] ^ $sb] ^ $s7]
+ $q1[$q1[$q0[$i] ^ $sd] ^ $s9]
+ $q1[$q1[$q0[$j] ^ $key[24]] ^ $key[16]]
+ $q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]]
+ $q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]]
+ $q1[$q1[$q0[$q1[$i] ^ $sf] ^ $sb] ^ $s7]
+ $q1[$q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]] ^ $key[16]]
+ $t0
+ $t0
+ $t0
+ $t0
+ $t0
+ $t0
+ $t0
+ $t0
+ $t1
+ $t1
+ $t1
+ $t1
+ ($R1 >> 31) & 1
+ ($R3 >> 31) & 1
+ (($R1 >> 31) & 1) | ($R1 << 1)
+ (($R3 >> 31) & 1) | ($R3 << 1)
+ $in[1]
+ $in[1]
+ $in[2]
+ $in[2]
+ $in[3]
+ $in[3]
+ $in[4]
+ $in[4]
+ $key[ 9]
+ $key[ 9]
+ $key[ 9]
+ $key[10]
+ $key[10]
+ $key[10]
+ $key[11]
+ $key[11]
+ $key[11]
+ $key[12]
+ $key[12]
+ $key[12]
+ $key[13]
+ $key[13]
+ $key[13]
+ $key[14]
+ $key[14]
+ $key[14]
+ $key[15]
+ $key[15]
+ $key[15]
+ $key[16]
+ $key[16]
+ $key[16]
+ $key[17]
+ $key[17]
+ $key[18]
+ $key[18]
+ $key[19]
+ $key[19]
+ $key[1]
+ $key[1]
+ $key[1]
+ $key[20]
+ $key[20]
+ $key[21]
+ $key[21]
+ $key[22]
+ $key[22]
+ $key[23]
+ $key[23]
+ $key[24]
+ $key[24]
+ $key[25]
+ $key[26]
+ $key[27]
+ $key[28]
+ $key[29]
+ $key[2]
+ $key[2]
+ $key[2]
+ $key[30]
+ $key[31]
+ $key[32]
+ $key[3]
+ $key[3]
+ $key[3]
+ $key[4]
+ $key[4]
+ $key[4]
+ $key[5]
+ $key[5]
+ $key[5]
+ $key[6]
+ $key[6]
+ $key[6]
+ $key[7]
+ $key[7]
+ $key[7]
+ $key[8]
+ $key[8]
+ $key[8]
+ $le_longs[1]
+ $le_longs[1]
+ $le_longs[1]
+ $le_longs[2]
+ $le_longs[2]
+ $le_longs[2]
+ $le_longs[3]
+ $le_longs[3]
+ $le_longs[3]
+ $le_longs[4]
+ $le_longs[4]
+ $le_longs[4]
+ $le_longs[5]
+ $le_longs[5]
+ $le_longs[6]
+ $le_longs[6]
+ $le_longs[7]
+ $le_longs[8]
+ $A
+ $A
+ $B
+ $B
+ $K[0]
+ $K[0]
+ $K[0]
+ $K[1]
+ $K[1]
+ $K[1]
+ $K[2]
+ $K[2]
+ $K[2]
+ $K[3]
+ $K[3]
+ $K[3]
+ $K[4]
+ $K[4]
+ $K[4]
+ $K[5]
+ $K[5]
+ $K[5]
+ $K[6]
+ $K[6]
+ $K[6]
+ $K[7]
+ $K[7]
+ $K[7]
+ $in[1]
+ $in[1]
+ $in[2]
+ $in[2]
+ $in[3]
+ $in[3]
+ $in[4]
+ $in[4]
+ $key[ 9]
+ $key[ 9]
+ $key[ 9]
+ $key[10]
+ $key[10]
+ $key[10]
+ $key[11]
+ $key[11]
+ $key[11]
+ $key[12]
+ $key[12]
+ $key[12]
+ $key[13]
+ $key[13]
+ $key[13]
+ $key[14]
+ $key[14]
+ $key[14]
+ $key[15]
+ $key[15]
+ $key[15]
+ $key[16]
+ $key[16]
+ $key[16]
+ $key[17]
+ $key[17]
+ $key[18]
+ $key[18]
+ $key[19]
+ $key[19]
+ $key[1]
+ $key[1]
+ $key[1]
+ $key[20]
+ $key[20]
+ $key[21]
+ $key[21]
+ $key[22]
+ $key[22]
+ $key[23]
+ $key[23]
+ $key[24]
+ $key[24]
+ $key[25]
+ $key[26]
+ $key[27]
+ $key[28]
+ $key[29]
+ $key[2]
+ $key[2]
+ $key[2]
+ $key[30]
+ $key[31]
+ $key[32]
+ $key[3]
+ $key[3]
+ $key[3]
+ $key[4]
+ $key[4]
+ $key[4]
+ $key[5]
+ $key[5]
+ $key[5]
+ $key[6]
+ $key[6]
+ $key[6]
+ $key[7]
+ $key[7]
+ $key[7]
+ $key[8]
+ $key[8]
+ $key[8]
+ $le_longs[1]
+ $le_longs[1]
+ $le_longs[1]
+ $le_longs[2]
+ $le_longs[2]
+ $le_longs[2]
+ $le_longs[3]
+ $le_longs[3]
+ $le_longs[3]
+ $le_longs[4]
+ $le_longs[4]
+ $le_longs[4]
+ $le_longs[5]
+ $le_longs[5]
+ $le_longs[6]
+ $le_longs[6]
+ $le_longs[7]
+ $le_longs[8]
+ setupInlineCrypt
+ $key_length
+ $kl
+ Twofish
+ Twofish
+ Twofish
+ Twofish
+ Twofish
+ Twofish
+ Twofish
+ Twofish
+ Twofish
+ $this->base_attr_cell
+ $match[1]
+ $match[1]
+ $match[2]
+ $this->attrs[$this->y]
+ $this->x
+ $this->x
+ $cur_attr
+ $cur_attr
+ $last_attr
+ $last_attr
+ $last_attr
+ $this->attrs[$this->y]
+ $this->history[$i][$j] ?? ''
+ $this->attrs[$i][$j]
+ $this->attrs[$i][$j]
+ $this->history_attrs[$i][$j]
+ $this->history_attrs[$i][$j]
+ $this->attrs[$this->y][$this->x]
+ $this->attrs[$this->y][$this->x]
+ $back
+ $cur_attr
+ $cur_attr
+ $front
+ $last_attr
+ $last_attr
+ $temp
+ $this->base_attr_cell
+ $cur_attr->background
+ $cur_attr->foreground
+ $this->max_x - $this->x
+ $this->max_x - ($this->x - 1)
+ $this->x
+ $this->x
+ $this->x
+ $this->x
+ $this->x + 1
+ $match[2] - 1
+ $this->x
+ $this->x
+ $this->x
+ $this->x
+ $this->x
+ $this->x
+ $this->x += $match[1]
+ $this->x -= $match[1]
+ $match[1]
+ $match[1]
+ $match[1]
+ $match[1]
+ $match[1]
+ $match[2]
+ getHistory
+ loadString
+ \phpseclib3\File\ANSI
+ $ansi
+ $attr_row
+ $attrs
+ $history
+ $history_attrs
+ $max_history
+ $max_x
+ $max_y
+ $old_x
+ $old_y
+ $screen
+ $tokenization
+ $x
+ $y
+ $this->screen
+ $this->screen
+ $this->screen
+ $this->screen
+ $this->screen
+ $old_x
+ $current['content'] === false
+ $temp === false
+ $temp === false
+ $temp === false
+ $temp
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ pack('Ca*', 0x80 | strlen($temp), $temp)
+ $source
+ string
+ string
+ string
+ string
+ $source
+ $source
+ $source
+ $source
+ $child
+ $child
+ $child
+ $child
+ $child
+ $child
+ $child
+ $content
+ $content
+ $content
+ $content_pos
+ $content_pos
+ $content_pos
+ $content_pos
+ $content_pos
+ $content_pos + $length
+ $decoded
+ $decoded
+ $decoded
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content'][$i]
+ $decoded['content'][0]
+ $decoded['length']
+ $decoded['start']
+ $decoded['type']
+ $eighty
+ $encoded
+ $encoded_pos
+ $filters + $mapping
+ $forty
+ $intype
+ $key
+ $key
+ $key
+ $length + $start
+ $mapping['mapping']
+ $mapping['mapping']
+ $mapping['mapping']
+ $mapping['mapping']
+ $mapping['mapping']
+ $mapping['mapping']
+ $mapping['mapping']
+ $mask
+ $offset
+ $oid
+ $option
+ $option
+ $size + $offset + 1
+ $source
+ $source
+ $source
+ $source
+ $source
+ $source[$key]
+ $source[$key]
+ $source[$typename]
+ $start
+ $start
+ $start + $offset
+ $tag
+ $tag
+ $tag
+ $temp
+ $temp
+ $temp[$i]['content']
+ $temp[$i]['content']
+ $temp[0]
+ $value
+ $value
+ $value
+ $zero
+ ($mapping['class'] << 6) | ($tag & 0x20) | $mapping['cast']
+ (self::CLASS_CONTEXT_SPECIFIC << 6) | (ord($temp[0]) & 0x20) | $child['constant']
+ (self::CLASS_CONTEXT_SPECIFIC << 6) | (ord($temp[0]) & 0x20) | $child['constant']
+ (self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | $child['constant']
+ (self::CLASS_CONTEXT_SPECIFIC << 6) | 0x20 | $child['constant']
+ self::$encoded[$decoded['start']]
+ $loc
+ self::$location
+ $child['cast']
+ $child['cast']
+ $child['class']
+ $child['class']
+ $child['constant']
+ $child['constant']
+ $child['default']
+ $child['default']
+ $child['type']
+ $child['type']
+ $child['type']
+ $child['type']
+ $current['content']
+ $current['content']
+ $current['start']
+ $current['start']
+ $current['start']
+ $decoded['constant']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content'][$i]
+ $decoded['content'][$i]
+ $decoded['content'][0]['content']
+ $decoded['length']
+ $decoded['start']
+ $decoded['start']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $filters[$part]
+ $mapping['mapping'][$i]
+ $mapping['mapping'][$temp]
+ $option['type']
+ $option['type']
+ $temp[$i]['content']
+ $temp[$i]['content']
+ $temp[$i]['type']
+ $temp[$last]['content']
+ $temp[$last]['type']
+ $temp['constant']
+ $temp['constant']
+ $temp['type']
+ $temp['type']
+ $temp['type']
+ $temp['type']
+ $temp[0]
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $current['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['type']
+ $bits[$i]
+ $filters[$part]
+ $filters[$part]
+ $map[$key]
+ $map[$key]
+ $map[$key]
+ $map[$key]
+ $map[$key]
+ $map[$key]
+ $source[$key]
+ $special[$key]
+ $special[$key]
+ $special[$key]
+ [$key => $value]
+ self::$encoded[$decoded['start']]
+ self::$oids[$decoded['content']]
+ self::ANY_MAP[$intype]
+ $bits[$i]
+ $filters[$part]
+ $candidate
+ $candidate
+ $child
+ $child
+ $child
+ $child
+ $child
+ $child
+ $child
+ $child
+ $childClass
+ $childClass
+ $class
+ $constant
+ $constant
+ $constant
+ $constant
+ $content
+ $content
+ $content
+ $content_pos
+ $content_pos
+ $content_pos
+ $current
+ $decoded
+ $decoded['content']
+ $decoded['type']
+ $filters
+ $i
+ $i
+ $intype
+ $key
+ $key
+ $key
+ $key
+ $key
+ $key
+ $length
+ $length
+ $length
+ $length
+ $length
+ $map[$key]
+ $map[$key]
+ $map[$key]
+ $map[$key]
+ $offset
+ $offset
+ $offset
+ $oid
+ $option
+ $part
+ $remainingLength
+ $size
+ $source
+ $start
+ $start
+ $start
+ $tag
+ $tag
+ $tag
+ $tag
+ $temp
+ $temp
+ $temp
+ $tempClass
+ $tempClass
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $values[]
+ $special[$idx]($source)
+ $special[$key]($candidate)
+ $special[$key]($candidate)
+ $special[$key]($value)
+ array|bool
+ array|bool|Element|string|null
+ int
+ string
+ format
+ toBytes
+ toString
+ $child['constant']
+ $child['constant']
+ $child['constant']
+ $child['constant']
+ $current
+ $current
+ $current
+ $current
+ $current['content']
+ $encoded_pos
+ $filters
+ $i
+ $length
+ $length
+ $length
+ $length
+ $length
+ $length
+ $length
+ $length + $start
+ $mapping['class']
+ $mapping['class']
+ $mapping['class']
+ $mapping['min']
+ $offset
+ $offset
+ $offset
+ $remainingLength
+ $size
+ $size
+ $size + $offset
+ $start
+ $start
+ $start
+ $start
+ $tag
+ $tag
+ $temp[$last]['content'][0]
+ $temp['content']
+ $temp['length']
+ $temp['length']
+ $temp['length']
+ $temp['length']
+ $type
+ $value
+ $value
+ ($mapping['class'] << 6) | ($tag & 0x20)
+ ($mapping['class'] << 6) | (ord($temp[0]) & 0x20)
+ ($mapping['class'] << 6) | 0x20
+ ($size + 1) & 7
+ $current + ['length' => $start - $current['start']]
+ $decoded['content']
+ $decoded['content']
+ $decoded['content'] ? $decoded['content']->format(self::$format) : false
+ $length
+ $temp
+ self::$oids[$decoded['content']] ?? $decoded['content']
+ self::$reverseOIDs[$name] ?? $name
+ pack('N', $length)
+ unpack('Nlength', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4))
+ format
+ $source
+ $source
+ $source
+ $source
+ $temp
+ $value
+ bindec($byte)
+ $length
+ $temp[$i]
+ $temp[$i]
+ $temp[$i]
+ $temp[$last]
+ $temp[$last]
+ $temp['content']
+ $temp['length']
+ $temp['length']
+ $temp['length']
+ $temp['type']
+ $source
+ $value
+ toBytes
+ $part2
+ $temp
+ $temp
+ $temp
+ $source
+ subtract
+ toBytes
+ $decoded['content'][0]
+ $decoded['content'][0]
+ $matches[1]
+ $matches[2]
+ $child['default']
+ $child['type']
+ $child['type']
+ $decoded['constant']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['content']
+ $decoded['length']
+ $decoded['start']
+ $decoded['start']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $decoded['type']
+ $mapping['children']
+ $mapping['children']
+ $mapping['children']
+ $mapping['children']
+ $mapping['children']
+ $mapping['children']
+ $mapping['children']
+ $mapping['children']
+ $mapping['children']
+ $mapping['class']
+ $mapping['class']
+ $mapping['class']
+ $mapping['type']
+ $mapping['type']
+ $mapping['type']
+ $mapping['type']
+ $mapping['type']
+ $mapping['type']
+ $temp['content']
+ $temp['length']
+ $temp['length']
+ $temp['length']
+ $temp['type']
+ $candidate
+ $candidate
+ $candidate
+ $candidate
+ $temp
+ $temp
+ decodeLength
+ setTimeFormat
+ \phpseclib3\File\ASN1\Element
+ CPSuri
+ PBMAC1params
+ Prime_p
+ PrivateKeyInfo
+ SubjectInfoAccessSyntax
+ Trinomial
+ !is_array($this->currentCert)
+ !is_array($this->currentCert)
+ !is_array($this->currentCert)
+ !is_array($this->currentCert)
+ !is_array($this->currentCert)
+ !is_array($this->currentCert)
+ !is_array($this->currentCert)
+ !is_array($this->currentCert)
+ !isset($this->currentCert)
+ !isset($this->currentCert)
+ !isset($this->currentCert)
+ !isset($this->currentCert)
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ inet_ntop($ip)
+ new BigInteger($serial, $base)
+ $j
+ $value
+ string
+ string
+ string
+ string
+ string
+ string
+ string
+ $x
+ function ($x) {
+ $dn
+ $domains
+ $propValue
+ $value
+ $value
+ $value
+ $value
+ $value
+ getAttribute
+ getChain
+ getDNProp
+ getExtension
+ getExtensionHelper
+ getIssuerDN
+ getIssuerDNProp
+ getMapping
+ getPublicKey
+ getRevoked
+ getRevokedCertificateExtension
+ getSubjectDN
+ getSubjectDNProp
+ loadCRL
+ loadCSR
+ loadSPKAC
+ loadX509
+ sign
+ signCRL
+ signCSR
+ signSPKAC
+ translateDNProp
+ $attribute['value']
+ $attribute['value']
+ $attribute['value']
+ $attributes[$key]['value']
+ $basicConstraints
+ $ca
+ $ca
+ $ca
+ $ca['tbsCertificate']['subject']
+ $ca['tbsCertificate']['subject']
+ $cert['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey']
+ $csr['certificationRequestInfo']['subjectPKInfo']['subjectPublicKey']
+ $data
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]['content'][0]['length']
+ $decoded[0]['content'][0]['length']
+ $decoded[0]['content'][0]['length']
+ $decoded[0]['content'][0]['length']
+ $decoded[0]['content'][0]['start']
+ $decoded[0]['content'][0]['start']
+ $decoded[0]['content'][0]['start']
+ $decoded[0]['content'][0]['start']
+ $dn
+ $dn
+ $dn
+ $dn
+ $dn
+ $dn
+ $dn
+ $dn
+ $dns[$i]
+ $dns[$i]
+ $id
+ $id
+ $id
+ $id
+ $ipAddress
+ $ip[0]
+ $ip[1]
+ $issuer->privateKey->withPassword()->toString('PSS')
+ $key
+ $key
+ $key
+ $key
+ $key
+ $key
+ $key
+ $keyUsage
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $notAfter
+ $notBefore
+ $prop
+ $propName
+ $rc['userCertificate']
+ $rclist
+ $rdn
+ $s
+ $signingCert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']['algorithm']
+ $signingCert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']['algorithm']
+ $signingCert['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey']
+ $signingCert['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey']
+ $spkac['publicKeyAndChallenge']['spki']['subjectPublicKey']
+ $subid
+ $subid
+ $subject->domains
+ $subvalue
+ $subvalue
+ $this->currentCert['certificationRequestInfo']['subject']
+ $this->currentCert['certificationRequestInfo']['subject']
+ $this->currentCert['certificationRequestInfo']['subjectPKInfo']['algorithm']['algorithm']
+ $this->currentCert['certificationRequestInfo']['subjectPKInfo']['subjectPublicKey']
+ $this->currentCert['publicKeyAndChallenge']['spki']['algorithm']['algorithm']
+ $this->currentCert['publicKeyAndChallenge']['spki']['subjectPublicKey']
+ $this->currentCert['signature']
+ $this->currentCert['signature']
+ $this->currentCert['signature']
+ $this->currentCert['signature']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['subject']
+ $this->currentCert['tbsCertificate']['subject']
+ $type
+ $type
+ $url
+ $v
+ $v
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value[$j]['policyQualifiers']
+ $value[$j]['policyQualifiers']
+ $value[0]
+ $values
+ $values
+ $values
+ $values
+ $values[$j]
+ $values[$j]
+ $x509
+ $x[0]
+ is_string($key) ? $key : $key->__toString()
+ $prop
+ $attr['value']
+ $attr['value']
+ $attribute['type']
+ $attribute['type']
+ $attribute['type']
+ $attribute['type']
+ $attribute['value']
+ $attribute['value']
+ $attribute['value']
+ $attribute['value']
+ $attribute['value']
+ $attributes[$i]['type']
+ $attributes[$i]['type']
+ $attributes[$i]['value']
+ $attributes[$i]['value']
+ $attributes[$i]['value']
+ $attributes[$i]['value']
+ $attributes[$key]['value']
+ $attributes[$key]['value']
+ $ca['tbsCertificate']
+ $ca['tbsCertificate']
+ $ca['tbsCertificate']
+ $ca['tbsCertificate']
+ $ca['tbsCertificate']
+ $ca['tbsCertificate']['serialNumber']
+ $ca['tbsCertificate']['serialNumber']
+ $cert['tbsCertificate']['subject']
+ $cert['tbsCertificate']['subjectPublicKeyInfo']
+ $cert['tbsCertificate']['subjectPublicKeyInfo']
+ $crl['tbsCertList']['revokedCertificates']
+ $csr['certificationRequestInfo']['subject']
+ $csr['certificationRequestInfo']['subject']
+ $csr['certificationRequestInfo']['subjectPKInfo']
+ $csr['certificationRequestInfo']['subjectPKInfo']
+ $csr['certificationRequestInfo']['subjectPKInfo']
+ $currentCert['tbsCertificate']['issuer']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $dn[$i]
+ $dn[$i]
+ $dn[$i]
+ $dn[$i]
+ $dns[$i][$j]
+ $dns[$i][$j]
+ $dns[$i][$j]
+ $dns[$i][$j]
+ $extension['extnId']
+ $extensions[$i]['extnId']
+ $extensions[$i]['extnId']
+ $extensions[$i]['extnValue']
+ $extensions[$i]['extnValue']
+ $field[0]
+ $field[0]
+ $key['certificationRequestInfo']['subjectPKInfo']['subjectPublicKey']
+ $key['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey']
+ $keyinfo['algorithm']
+ $keyinfo['subjectPublicKey']
+ $notAfter['generalTime']
+ $notAfter['utcTime']
+ $notBefore['generalTime']
+ $notBefore['utcTime']
+ $opt['accessLocation']
+ $opt['accessMethod']
+ $rc['userCertificate']
+ $rc['userCertificate']
+ $rdn[$i]
+ $root[$i]
+ $signingCert['tbsCertificate']
+ $signingCert['tbsCertificate']
+ $signingCert['tbsCertificate']
+ $signingCert['tbsCertificate']
+ $spkac['publicKeyAndChallenge']['spki']
+ $spkac['publicKeyAndChallenge']['spki']
+ $spkac['publicKeyAndChallenge']['spki']
+ $tbsCertList['nextUpdate']
+ $tbsCertList['revokedCertificates']
+ $tbsCertList['version']
+ $this->currentCert['certificationRequestInfo']['subject']
+ $this->currentCert['certificationRequestInfo']['subject']
+ $this->currentCert['certificationRequestInfo']['subjectPKInfo']
+ $this->currentCert['certificationRequestInfo']['subjectPKInfo']
+ $this->currentCert['publicKeyAndChallenge']['spki']
+ $this->currentCert['publicKeyAndChallenge']['spki']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertList']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['subject']
+ $this->currentCert['tbsCertificate']['subject']
+ $this->currentCert['tbsCertificate']['subject']
+ $this->currentCert['tbsCertificate']['validity']
+ $this->currentCert['tbsCertificate']['validity']
+ $value[$j]
+ $value[$j]
+ $value[$j]
+ $value[$j]['policyQualifiers'][$k]
+ $value[$j]['policyQualifiers'][$k]
+ $value['authorityCertSerialNumber']
+ $value['extnId']
+ $value['extnId']
+ $value['extnId']
+ $value['extnId']
+ $value['extnValue']
+ $value['type']
+ $value[0]
+ $values[$j]
+ $values[$j]
+ $x509['tbsCertificate']['subject']
+ $x509['tbsCertificate']['subjectPublicKeyInfo']
+ $x[0]
+ $attr['value']
+ $attributes[$key]['value']
+ $attributes[$key]['value']
+ $attributes[$last]['value']
+ $cert['tbsCertificate']['signature']
+ $cert['tbsCertificate']['subjectPublicKeyInfo']
+ $csr['certificationRequestInfo']['subjectPKInfo']
+ $csr['certificationRequestInfo']['subjectPKInfo']
+ $extensions[$key]
+ $extensions[]
+ $rclist[$i]['revocationDate']
+ $root[$i]
+ $spkac['publicKeyAndChallenge']['spki']
+ $spkac['publicKeyAndChallenge']['spki']
+ $tbsCertList['issuer']
+ $tbsCertList['nextUpdate']
+ $tbsCertList['thisUpdate']
+ $tbsCertList['version']
+ $this->currentCert['certificationRequestInfo']['subject']
+ $this->currentCert['certificationRequestInfo']['subjectPKInfo']
+ $this->currentCert['publicKeyAndChallenge']['challenge']
+ $this->currentCert['publicKeyAndChallenge']['spki']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['signatureAlgorithm']['algorithm']
+ $this->currentCert['tbsCertList']['signature']
+ $this->currentCert['tbsCertificate']['issuer']
+ $this->currentCert['tbsCertificate']['serialNumber']
+ $this->currentCert['tbsCertificate']['signature']
+ $this->currentCert['tbsCertificate']['subject']
+ $this->currentCert['tbsCertificate']['subjectPublicKeyInfo']
+ $this->currentCert['tbsCertificate']['validity']
+ $this->currentCert['tbsCertificate']['validity']
+ $this->dn['rdnSequence'][]
+ $value['authorityCertSerialNumber']
+ $values[$j]
+ $values[$j]
+ $values[$j]
+ $x509['tbsCertificate']['subjectPublicKeyInfo']
+ $attributes[$last]
+ $extensions[$key]
+ $rdn[$i]
+ $attr
+ $attr
+ $attribute
+ $attribute
+ $attribute
+ $attribute
+ $attributes[$key]['value'][$disposition]
+ $attributes[$last]['value'][]
+ $attrs[]
+ $authorityKey
+ $authorityKey
+ $authorityKey
+ $authorityKey
+ $basicConstraints
+ $ca
+ $ca
+ $ca
+ $cert
+ $cert
+ $certificationRequestInfo
+ $crlNumber
+ $crlNumber
+ $csrexts
+ $currentKeyIdentifier
+ $currentKeyIdentifier
+ $data
+ $dn
+ $dn
+ $dn
+ $extension
+ $extension
+ $extension
+ $extension
+ $extensions[]
+ $field
+ $filters['tbsCertificate']['extensions'][]
+ $i
+ $i
+ $id
+ $id
+ $id
+ $id
+ $ipAddress
+ $issuerAltName
+ $key
+ $key
+ $key
+ $key
+ $key
+ $key
+ $key
+ $keyUsage
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $map
+ $name
+ $names
+ $notAfter
+ $notAfter
+ $notBefore
+ $notBefore
+ $opt
+ $prop
+ $propName
+ $propName
+ $propName
+ $publicKeyAndChallenge
+ $rc
+ $rc
+ $rclist
+ $rdn
+ $result[$desc]
+ $result['certificationRequestInfo']
+ $result['publicKeyAndChallenge']
+ $result['tbsCertList']
+ $result['tbsCertificate']
+ $result[]
+ $result[]
+ $root
+ $root
+ $root
+ $s
+ $subid
+ $subid
+ $subjectKeyID
+ $subjectKeyID
+ $subjectKeyID
+ $subjectKeyID
+ $subvalue
+ $subvalue
+ $subvalue
+ $tbsCertList
+ $tbsCertList
+ $tbsCertificate
+ $this->currentCert
+ $this->currentCert
+ $this->dn
+ $this->dn
+ $this->dn
+ $this->dn
+ $this->publicKey
+ $this->publicKey
+ $this->publicKey
+ $this->publicKey
+ $type
+ $type
+ $type
+ $url
+ $v
+ $v
+ $v
+ $v
+ $v
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $value
+ $values
+ $values
+ $version
+ ?array
+ array|bool|string
+ array|false
+ array|false
+ bool
+ __toString
+ add
+ equals
+ equals
+ getPublicKey
+ toBytes
+ toString
+ toString
+ $issuer->privateKey->sign($this->signatureSubject)
+ $issuer->privateKey->sign($this->signatureSubject)
+ $this->privateKey->sign($this->signatureSubject)
+ $this->privateKey->sign($this->signatureSubject)
+ $value
+ $dn
+ $key->verify($signatureSubject, $signature)
+ $root
+ $root
+ self::$extensions[$id] ?? null
+ $i
+ int|false
+ $line
+ $line
+ $publicKey
+ $rclist
+ $rclist
+ $rclist
+ $rclist
+ $results
+ base64_decode(preg_replace('#-.+-|[\r\n]#', '', $cert['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey']))
+ base64_decode(preg_replace('#-.+-|[\r\n]#', '', $csr['certificationRequestInfo']['subjectPKInfo']['subjectPublicKey']))
+ base64_decode(preg_replace('#-.+-|[\r\n]#', '', $spkac['publicKeyAndChallenge']['spki']['subjectPublicKey']))
+ pack('N', $hash)
+ unpack('Vhash', $hash)
+ inet_pton($ip[0])
+ inet_pton($ip[1])
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ $crl
+ $csr
+ $date
+ $date
+ $dn
+ $raw
+ $parts['host']
+ $parts['scheme']
+ $parts[path]
+ $results[$i + 1]
+ $results[$i]
+ $date
+ $date
+ $dn
+ $value
+ __toString
+ toString
+ toString
+ $key->getCurve()
+ $cert
+ $csr
+ $cert
+ $crl
+ $csr
+ $path
+ $spkac
+ $temp
+ $v
+ $value
+ $values[$j]
+ preg_replace('#-.+-|[\r\n]#', '', $cert['tbsCertificate']['subjectPublicKeyInfo']['subjectPublicKey'])
+ preg_replace('#-.+-|[\r\n]#', '', $csr['certificationRequestInfo']['subjectPKInfo']['subjectPublicKey'])
+ preg_replace('#-.+-|[\r\n]#', '', $spkac['publicKeyAndChallenge']['spki']['subjectPublicKey'])
+ preg_replace('#-.+-|[\r\n]#', '', $this->publicKey->toString($format))
+ preg_replace('#WithRSAEncryption$#', '', $signatureAlgorithm)
+ preg_replace('#^ecdsa-with-#', '', strtolower($signatureAlgorithm))
+ preg_replace('#^id-dsa-with-#', '', strtolower($signatureAlgorithm))
+ preg_replace_callback('#[^\x20-\x7E]#', $callback, $value->element)
+ $spkac['publicKeyAndChallenge']
+ $spkac['publicKeyAndChallenge']
+ $cert['signatureAlgorithm']
+ $spkac['publicKeyAndChallenge']
+ $result
+ $desc
+ $currentCert
+ $currentCert
+ $currentCert
+ $currentCert
+ $signatureSubject
+ $signatureSubject
+ $signatureSubject
+ $signatureSubject
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ is_string($currentKeyIdentifier) ? $currentKeyIdentifier : null
+ is_string($currentKeyIdentifier) ? $currentKeyIdentifier : null
+ null
+ null
+ null
+ null
+ null
+ null
+ $parts['host']
+ $parts['scheme']
+ $parts[path]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $ip[0]
+ $ip[1]
+ $temp[1]
+ $this->domains[0]
+ $value
+ __toString
+ $ca['tbsCertificate']
+ $ca['tbsCertificate']
+ $crl['tbsCertList']
+ $csr['certificationRequestInfo']
+ $currentCert['tbsCertificate']
+ $dn['rdnSequence']
+ $dn['rdnSequence']
+ $dn['rdnSequence']
+ $spkac['publicKeyAndChallenge']
+ $spkac['publicKeyAndChallenge']
+ $spkac['publicKeyAndChallenge']
+ $this->currentCert['signature']
+ $this->currentCert['signature']
+ $this->currentCert['signature']
+ $this->currentCert['signature']
+ $this->currentCert['signatureAlgorithm']
+ $this->currentCert['signatureAlgorithm']
+ $this->currentCert['signatureAlgorithm']
+ $this->currentCert['signatureAlgorithm']
+ $this->dn['rdnSequence']
+ $x509['tbsCertificate']
+ $signingCert
+ $signingCert
+ $subjectPublicKey
+ decodeIP
+ decodeNameConstraintIP
+ disableURLFetch
+ enableURLFetch
+ encodeIP
+ getAttributes
+ getChain
+ getCurrentCert
+ getIssuerDNProp
+ getRevoked
+ getRevokedCertificateExtensions
+ getSubjectDN
+ getSubjectDNProp
+ listRevoked
+ removeRevokedCertificateExtension
+ revoke
+ setAttribute
+ setIPAddress
+ setKeyIdentifier
+ setRevokedCertificateExtension
+ setSerialNumber
+ signCRL
+ unrevoke
+ \phpseclib3\File\X509
+ bool
+ bool
+ bool
+ bool
+ bool
+ $CAs
+ $challenge
+ $currentCert
+ $currentKeyIdentifier
+ $dn
+ $endDate
+ $oids
+ $privateKey
+ $publicKey
+ $serialNumber
+ $signatureSubject
+ $startDate
+ !is_array($v) && isset($type)
+ $encoded !== false
+ $s !== false
+ $v !== false
+ $v !== false
+ is_array($crl->currentCert)
+ is_array($subject->currentCert)
+ is_array($subject->currentCert)
+ is_array($this->currentCert)
+ is_array($this->currentCert)
+ is_array($this->currentCert)
+ isset($crl->currentCert)
+ isset($crl->currentCert) && is_array($crl->currentCert)
+ isset($issuer->currentKeyIdentifier)
+ isset($issuer->currentKeyIdentifier)
+ isset($key->privateKey)
+ isset($key->publicKey)
+ isset($subject->currentCert)
+ isset($subject->currentCert)
+ isset($subject->currentCert) && is_array($subject->currentCert)
+ isset($subject->currentCert) && is_array($subject->currentCert)
+ isset($subject->currentKeyIdentifier)
+ isset($subject->publicKey)
+ isset($this->currentCert) && is_array($this->currentCert)
+ isset($this->currentCert) && is_array($this->currentCert)
+ isset($this->currentCert) && is_array($this->currentCert)
+ isset($this->currentCert) && is_array($this->currentCert)
+ strtolower
+ !isset($this->signatureSubject)
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->currentCert
+ $this->signatureSubject
+ $this->signatureSubject
+ $this->signatureSubject
+ $this->signatureSubject
+ isset($this->currentCert)
+ isset($this->publicKey)
+ null
+ null
+ null
+ null
+ null
+ null
+ null
+ null
+ $cert
+ $crl
+ $csr
+ $root
+ $root
+ $root
+ $root
+ $spkac
+ !is_array($cert)
+ !is_array($crl)
+ !is_array($csr)
+ !is_array($spkac)
+ $cert === false
+ $crl === false
+ $csr === false
+ $spkac === false
+ 'md5'
+ 'sha1'
+ 'sha224'
+ 'sha224'
+ 'sha224'
+ 'sha256'
+ 'sha256'
+ 'sha384'
+ 'sha384'
+ is_array($cert)
+ is_array($crl)
+ is_array($csr)
+ is_array($root)
+ is_array($spkac)
+ is_string($extnId)
+ verify
+ new static()
+ $attr
+ $extension
+ $extension
+ $oids
+ $count
+ $key
+ $key
+ $subvalue
+ $value
+ $modexp
+ $gcd
+ $max
+ $min
+ $x
+ $y
+ $this->value
$val
+ $class::max(...$nums)
+ $class::min(...$nums)
+ $class::randomRange($min->value, $max->value)
+ $class::randomRangePrime($min->value, $max->value)
+ $func($x->value)
+ $q
+ $r
+ $this->value->abs()
+ $this->value->add($y->value)
+ $this->value->bitwise_and($x->value)
+ $this->value->bitwise_leftRotate($shift)
+ $this->value->bitwise_leftShift($shift)
+ $this->value->bitwise_not()
+ $this->value->bitwise_or($x->value)
+ $this->value->bitwise_rightRotate($shift)
+ $this->value->bitwise_rightShift($shift)
+ $this->value->bitwise_split($split)
+ $this->value->bitwise_xor($x->value)
+ $this->value->extendedGCD($n->value)
+ $this->value->gcd($n->value)
+ $this->value->modInverse($n->value)
+ $this->value->modPow($e->value, $n->value)
+ $this->value->multiply($x->value)
+ $this->value->negate()
+ $this->value->pow($n->value)
+ $this->value->powMod($e->value, $n->value)
+ $this->value->root($n)
+ $this->value->subtract($y->value)
+ $val
+ $q
+ $r
+ $func
+ [$q, $r]
+ $func($x->value)
+ bool
+ bool
+ bool
+ bool
+ bool
+ bool
+ int
+ int
+ int
+ int
+ int|bool
+ string
+ string
+ string
+ string
+ $fqmain::isValidEngine()
+ __debugInfo
+ abs
+ add
+ between
+ bitwise_and
+ bitwise_leftRotate
+ bitwise_leftShift
+ bitwise_not
+ bitwise_or
+ bitwise_rightRotate
+ bitwise_rightShift
+ bitwise_split
+ bitwise_xor
+ compare
+ createRecurringModuloFunction
+ divide
+ equals
+ extendedGCD
+ gcd
+ getLength
+ getLengthInBytes
+ getPrecision
+ isNegative
+ isOdd
+ isPrime
+ modInverse
+ modPow
+ multiply
+ negate
+ pow
+ powMod
+ root
+ setPrecision
+ subtract
+ testBit
+ toBits
+ toBytes
+ toHex
+ toString
+ [$main, $modexp]
+ $class::scan1divide($r->value)
+ $this->value->between($min->value, $max->value)
+ $this->value->compare($y->value)
+ $this->value->equals($x->value)
+ $this->value->getLength()
+ $this->value->getLengthInBytes()
+ $this->value->getPrecision()
+ $this->value->isNegative()
+ $this->value->isOdd()
+ $this->value->isPrime($t)
+ $this->value->testBit($x)
+ $this->value->toBits($twos_compliment)
+ $this->value->toBytes($twos_compliment)
+ $this->value->toHex($twos_compliment)
+ $this->value->toString()
+ $modexp
+ abs
+ between
+ bitwise_leftRotate
+ bitwise_not
+ bitwise_split
+ extendedGCD
+ getEngine
+ jsonSerialize
+ max
+ min
+ root
+ $bits
+ $hex
+ $precision
+ isset(self::$mainEngine)
+ $class::max(...$nums)
$class::min(...$nums)
@@ -11,8 +11852,51 @@
$class::randomRangePrime($min->value, $max->value)
$class::scan1divide($r->value)
new self::$mainEngine($x, $base)
+ new static("$x")
+ new static($class::max(...$nums))
+ new static($class::min(...$nums))
+ new static($class::random($size))
+ new static($class::randomPrime($size))
+ new static($class::randomRange($min->value, $max->value))
+ new static($class::randomRangePrime($min->value, $max->value))
+ new static($func($x->value))
+ new static($gcd)
+ new static($max)
+ new static($min)
+ new static($q)
+ new static($r)
+ new static($this->hex, -16)
+ new static($this->value->abs())
+ new static($this->value->add($y->value))
+ new static($this->value->bitwise_and($x->value))
+ new static($this->value->bitwise_leftRotate($shift))
+ new static($this->value->bitwise_leftShift($shift))
+ new static($this->value->bitwise_not())
+ new static($this->value->bitwise_or($x->value))
+ new static($this->value->bitwise_rightRotate($shift))
+ new static($this->value->bitwise_rightShift($shift))
+ new static($this->value->bitwise_xor($x->value))
+ new static($this->value->gcd($n->value))
+ new static($this->value->modInverse($n->value))
+ new static($this->value->modPow($e->value, $n->value))
+ new static($this->value->multiply($x->value))
+ new static($this->value->negate())
+ new static($this->value->pow($n->value))
+ new static($this->value->powMod($e->value, $n->value))
+ new static($this->value->root($n))
+ new static($this->value->subtract($y->value))
+ new static($val)
+ new static($x)
+ new static($y)
+ $this->powModOuter($e, $n)
+ $this->powModOuter($e, $n)
+ $current
$current
@@ -46,6 +11930,178 @@
$y->value
$y->value[0] == '-' ? substr($y->value, 1) : $y->value
BCMath
+ BCMath
+ $temp->add(static::$one[static::class])
+ $this->bitwiseAndHelper($x)
+ $this->bitwiseXorHelper($x)
+ $this->bitwiseXorHelper($x)
+ [$this->normalize($quotient), $this->normalize($remainder)]
+ self::maxHelper($nums)
+ self::minHelper($nums)
+ self::randomRangeHelper($min, $max)
+ $x
+ $x
+ $x
+ $x + 1
+ BCMath
+ $r_value[strlen($r_value) - 1]
+ $this->value[strlen($this->value) - 1]
+ $this->value[strlen($this->value) - 1]
+ $x
+ $class::powModHelper($this, $e, $n, static::class)
+ BCMath
+ BCMath
+ BCMath
+ BCMath
+ BCMath
+ BCMath
+ Engine
+ array{gcd: static, x: static, y: static}
+ array{static, static}
+ $current
+ $r_value
+ $temp >> 16
+ $temp >> 8
+ $temp->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $x
+ $y->value
+ $current[0]
+ $r_value[strlen($r_value) - 1]
+ $temp->value[0]
+ $this->value[0]
+ $this->value[0]
+ $this->value[strlen($this->value) - 1]
+ $this->value[strlen($this->value) - 1]
+ $y->value[0]
+ $current
+ $current
+ $current
+ $current
+ $n->value
+ $r_value
+ $result->bitmask->value
+ $result->value
+ $temp
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $u
+ $v
+ $v
+ $x
+ $x->value
+ $y->value
+ $y->value
+ $y->value
+ $y->value
+ $y->value
+ $y->value[0] == '-' ? substr($y->value, 1) : $y->value
+ $remainder->value
+ bcmod($this->value, bcpow('2', $x + 1, 0))
+ $remainder->value[0]
+ $temp
+ $temp
+ bcmod($result->value, $result->bitmask->value)
+ bcmod($this->value, $y->value)
+ $current[0]
+ $temp->value[0]
+ $this->value[0]
+ $this->value[0]
+ $y->value[0]
+ abs
+ between
+ bitwise_and
+ bitwise_leftShift
+ bitwise_or
+ bitwise_rightShift
+ bitwise_xor
+ divide
+ equals
+ gcd
+ isNegative
+ make_odd
+ max
+ min
+ modInverse
+ modPow
+ multiply
+ negate
+ pow
+ powMod
+ powModInner
+ randomRange
+ randomRangePrime
+ scan1divide
+ subtract
+ testBit
+ testSmallPrimes
+ toBytes
+ toString
+ BCMath
+ BCMath
+ $this->bitmask
+ $class::powModHelper($this, $e, $n, static::class)
$current
@@ -57,8 +12113,46 @@
$this->value
$y->value
new static($a)
+ new static($b)
+ new static($u)
+ new static()
+ new static()
+ new static()
+ $value
+ $class
+ $temp
+ $x
+ $x
+ $x
+ $y
+ static::slidingWindow($x, $e, $n, $class)
+ new $class()
+ string
+ string
+ string
+ static::reduce($x, $n)
+ static::reduce(bcmul($x, $x), $n)
+ static::reduce(bcmul($x, $y), $n)
+ multiplyReduce
+ prepareReduce
+ squareReduce
+ static::reduce($x, $n)
static::reduce(bcmul($x, $x), $n)
@@ -71,8 +12165,173 @@
$n->value
$x->value
+ bcpowmod($x->value, $e->value, $n->value)
+ $e->value
+ $n->value
+ $x->value
+ BuiltIn
+ OpenSSL
+ $lhs
+ $lhs
+ $lhs
+ $lsd
+ $m
+ $m
+ $m
+ $msd
+ $n
+ $n
+ $n
+ $n
+ $n
+ $n
+ $q
+ $r1
+ $r2
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $x
+ string
+ string
+ $cache[self::DATA][$key]
+ $cache[self::DATA][$key]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $m
+ $m
+ $m
+ $m1
+ $m_length + 1
+ $n
+ $u
+ -$cutoff
+ -$cutoff
+ -($m_length >> 1) - 1
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::DATA][$key]
+ $cache[self::DATA][$key]
+ $cutoff
+ $key
+ $key
+ $m_length
+ $m_length
+ $m_length
+ -($m_length >> 1)
+ bcmod($n, $m)
+ bcmod($x, $n)
+ $m1
+ $u
+ reduce
+ $key
+ $lhs
+ $lhs
+ $m
+ $m
+ $m
+ $custom_reduction
+ $inline
+ self::$custom_reduction
+ self::$custom_reduction
+ $inline($n)
+ callable|void
+ string
+ $func
+ $inline($n)
+ EvalBarrett
+ $fqengine
+ $leading_ones | $temp
+ $left & $right
+ $left ^ $right
+ $left | $right
+ $max
+ $min
+ $temp
+ $this->hex
+ Random::string($size)
+ Random::string(1)
+ Strings::bits2bin($x)
+ chr((1 << ($bits & 0x7)) - 1) . str_repeat(chr(0xFF), $bits >> 3)
+ chr(1) . str_repeat("\0", $size)
+ new static('-1')
+ new static('-1')
+ $x[0]
$x[0]
@@ -82,6 +12341,351 @@
static::$zero
static::$zero
+ $x
+ $x
+ $x
+ $x
+ $fqengine::generateCustomReduction($this, static::class)
+ $min->isPrime() ? $min : false
+ $x
+ $bits
+ $bits[0]
+ $bytes
+ $hex
+ $left
+ $left
+ $left
+ $mask
+ $max->toBytes()
+ $right
+ $right
+ $right
+ $temp
+ $temp[0]
+ $temp[0]
+ $this->toBytes($twos_compliment)
+ $this->toBytes()
+ $window_ranges
+ $x
+ $x[0]
+ $bits[0]
+ $g->divide(static::$two[static::class])[0]
+ $max_multiple
+ $max_multiple
+ $og->subtract($g)->divide(static::$two[static::class])[0]
+ $q
+ $random
+ $step->divide(static::$two[static::class])[0]
+ $temp[0]
+ $temp[0]
+ $window_ranges[$i]
+ $temp[0]
+ $a
+ $a
+ $b
+ $bits
+ $bytes
+ $c
+ $comp
+ $compare
+ $compare
+ $comparison
+ $d
+ $e
+ $func
+ $g
+ $g
+ $g
+ $g
+ $g
+ $g
+ $guess
+ $hex
+ $left
+ $left
+ $left
+ $left
+ $left
+ $mask
+ $mask
+ $mask
+ $mask
+ $max
+ $max
+ $max
+ $max_multiple
+ $max_multiple
+ $min
+ $min
+ $n
+ $n
+ $n_1
+ $n_2
+ $num
+ $og
+ $powers[$i2 + 1]
+ $powers[1]
+ $powers[2]
+ $r
+ $random
+ $random
+ $random
+ $random_max
+ $random_max
+ $result
+ $result
+ $result
+ $result
+ $result
+ $right
+ $right
+ $right
+ $right
+ $root
+ $root
+ $root
+ $s
+ $step
+ $step
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp->value
+ $this->value
+ $this->value
+ $this->value
+ $u
+ $v
+ $vals[]
+ $x
+ $x
+ $x
+ $y
+ $y
+ [$max_multiple]
+ [$max_multiple]
+ [$q]
+ [, $random]
+ clone $n_1
+ Engine
+ Engine
+ Engine
+ Engine
+ Engine
+ Engine
+ Engine
+ Engine
+ Engine
+ Engine
+ Engine|string
+ \Closure
+ static|false
+ static|false
+ static|false
+ $fqengine::isValidEngine()
+ add
+ add
+ add
+ add
+ add
+ add
+ bitwise_and
+ bitwise_and
+ bitwise_leftShift
+ bitwise_leftShift
+ bitwise_or
+ bitwise_rightShift
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ divide
+ divide
+ divide
+ divide
+ divide
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ isPrime
+ modInverse
+ modPow
+ modPow
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ pow
+ pow
+ pow
+ powModInner
+ subtract
+ subtract
+ subtract
+ subtract
+ subtract
+ subtract
+ subtract
+ subtract
+ toBytes
+ toBytes
+ toBytes
+ static::ENGINE_DIR
+ static::ENGINE_DIR
+ $temp->value
+ $temp->value
+ $temp->value
+ $max
+ $min
+ $nums[0]
+ $nums[0]
+ $random->add($min)
+ $this->compare(static::$zero[static::class]) < 0 ? $this->normalize($n->subtract($x)) : $this->normalize($x)
+ $this->normalize($n->subtract($temp))
+ $this->normalize($result)
+ $this->normalize($root)
+ $this->normalize($root)
+ $this->normalize($temp->powModInner($e, $n))
+ $this->normalize(new static($leading_ones | $temp, 256))
+ $this->normalize(new static($left & $right, -256))
+ $this->normalize(new static($left ^ $right, -256))
+ $this->normalize(new static($left | $right, -256))
+ $this->normalize(new static($temp, 256))
+ $this->normalize(static::$zero[static::class])
+ $this->powModInner($e, $n)
+ $this->toString()
+ $x
+ static::randomRange($min, $max)
+ static::randomRangePrime($min, $max)
+ Engine[]
+ array_reverse($vals)
+ array{gcd: Engine, x: Engine, y: Engine}
+ strpos($msb, '0')
+ subtract
+ toBytes
+ $t
+ $x
+ $x
+ bindec($msb)
+ $powers[bindec(substr($e_bits, $i, $j + 1))]
+ $this->value
+ $x
+ $x
+ $x[0]
+ $x[0]
+ $x
+ preg_replace('#(?<!^)-.*|(?<=^|-)0*|[^-0-9].*#', '', (string) $x)
+ $nums[0]
+ $nums[0]
+ $nums[0]
+ $nums[0]
+ add
+ bitwise_and
+ bitwise_rightShift
+ compare
+ equals
+ equals
+ equals
+ multiply
+ multiply
+ multiply
+ multiply
+ pow
+ subtract
+ subtract
+ $comp
+ bitwise_not
+ bitwise_rightRotate
+ bitwise_split
+ createRecurringModuloFunction
+ getLength
+ jsonSerialize
+ root
+ $n
+ $size
+ $size
+ $reduce
+ $hex
+ $reduce
+ $value
+ static::$modexpEngine
+ static::ENGINE_DIR
static::ENGINE_DIR
@@ -168,18 +12772,712 @@
toBytes
toString
+ new $class()
+ new $class(1)
+ new static($leading_ones | $temp, 256)
+ new static($left & $right, -256)
+ new static($left ^ $right, -256)
+ new static($left | $right, -256)
+ new static($mask, 256)
+ new static($max, 256)
+ new static($min, 256)
+ new static($n)
+ new static($temp, 256)
+ new static($this->hex, -16)
+ new static('-1')
+ new static('-1')
+ new static('2')
+ new static()
+ new static()
+ new static()
+ new static()
+ new static(0)
+ new static(1)
+ new static(1)
+ new static(1)
+ new static(1)
+ new static(1)
+ new static(2)
+ new static(Random::string($size), 256)
+ new static(Random::string(1), 256)
+ new static(Strings::bits2bin($x), 128 * $base)
+ new static(chr((1 << ($bits & 0x7)) - 1) . str_repeat(chr(0xFF), $bits >> 3), 256)
+ new static(chr(1) . str_repeat("\0", $size), 256)
+ $root
+ $min
+ $x
+ $this->powModOuter($e, $n)
+ $this->powModOuter($e, $n)
+ self::randomRangePrime($min, $x)
+ GMP
+ GMP
+ GMP
+ $this->value * $x->value
+ $this->value ** $n->value
+ $this->value + $y->value
+ $this->value - $y->value
+ $x->value % $temp
+ GMP
+ self::maxHelper($nums)
+ self::minHelper($nums)
+ self::randomRangeHelper($min, $max)
+ $x
+ $this->value ?? '0'
+ $x
+ $x
+ GMP
+ $class::powModHelper($this, $e, $n)
+ GMP
+ GMP
+ GMP
+ $temp
+ $temp
+ gmp_import($this->value)
+ gmp_invert($this->value, $n->value)
+ $n->value
+ $n->value
+ $n->value
+ $r->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value ?? '0'
+ $x->value
+ $y->value
+ $y->value
+ $y->value
+ $this->value
+ $this->value
+ $n->value
+ $r->value
+ $s
+ $shift
+ $shift
+ $temp
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $x->value
+ $x->value
+ $x->value
+ $y->value
+ $y->value
+ 1
+ -$result->value
+ -$result->value
+ -$this->value
+ abs
+ between
+ bitwise_and
+ bitwise_leftShift
+ bitwise_or
+ bitwise_rightShift
+ bitwise_xor
+ divide
+ equals
+ extendedGCD
+ gcd
+ isNegative
+ isOdd
+ make_odd
+ max
+ min
+ modInverse
+ modPow
+ multiply
+ negate
+ pow
+ powMod
+ powModInner
+ randomRange
+ scan1divide
+ subtract
+ testBit
+ toBytes
+ toString
+ GMP
+ GMP
+ $this->bitmask
+ $this->value
+ '0'
+ $class::powModHelper($this, $e, $n)
new static()
+ $e->value
+ $n->value
+ $x->value
+ DefaultEngine
+ $x->toBytes()
+ openssl_error_string()
+ isValidEngine
+ powModHelper
+ toBytes
$result
+ $result
+ $value
+ $x
+ $prime
+ $s
+ $temp
+ $temp
+ $temp->value
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp_value
+ $temp_value
+ $x
+ $x
+ $x
+ $x / static::BASE
+ $x->value
+ $x_value
+ $x_window[0] * static::BASE_FULL + $x_window[1]
+ $xx[self::SIGN]
+ $xx[self::VALUE]
+ $xy[self::SIGN]
+ $xy[self::VALUE]
+ $y->value[0]
+ $y_window[0]
+ $z1[self::SIGN]
+ $z1[self::SIGN]
+ $z1[self::VALUE]
+ $z1[self::VALUE]
+ $z1[self::VALUE]
+ $z1[self::VALUE]
+ static::MAX10LEN
+ static::MAX10LEN
+ static::MAX10LEN
+ strlen($x) + ((static::MAX10LEN - 1) * strlen($x)) % static::MAX10LEN
+ $digit
+ $this->value
+ $value
+ $value
+ $value
+ $x_value
+ self::baseSquare($x)
+ self::karatsuba($x_value, $y_value)
+ self::karatsubaSquare($x)
+ self::regularMultiply($x_value, $y_value)
+ $mod
+ $temp
+ $x_value[$i - 1]
+ $x_value[$i - 2]
+ $x_value[$i]
+ $bit
+ $carry
+ $carry
+ $carry
+ $carry
+ $carry
+ $carry
+ $carry_mask
+ $carry_shift
+ $diff
+ $digit
+ $digit
+ $digit[$j]
+ $digit[]
+ $digit[]
+ $lhs
+ $lhs
+ $mask
+ $mask
+ $msb
+ $msb
+ $n
+ $newbits
+ $overflow
+ $overflow
+ $overflow
+ $overflow
+ $prime
+ $product_value[$j]
+ $product_value[$k]
+ $quotient->value
+ $quotient_value[$q_index]
+ $quotient_value[$q_index]
+ $quotient_value[$q_index]
+ $quotient_value[$x_max - $y_max]
+ $remaining
+ $remaining
+ $remaining
+ $remaining
+ $remaining
+ $result->is_negative
+ $result->value
+ $rhs_value
+ $s
+ $shift
+ $shift
+ $shift
+ $square_value[$i + $max_index + 1]
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp_value
+ $tempmask
+ $tempmask
+ $tempoverflow
+ $tempsplit
+ $this->value
+ $val[$i]
+ $val[$i]
+ $vals[]
+ $value[$i]
+ $value[$i]
+ $value[$i]
+ $value[$j]
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x_value
+ $x_value[$i]
+ $x_value[$i]
+ $x_value[$i]
+ $x_value[$j]
+ [$temp, $mod]
+ static::$isValidEngine[static::class]
+ PHP
+ PHP
+ array
+ array
+ add
+ add
+ compare
+ compare
+ compare
+ divide
+ equals
+ multiply
+ multiply
+ multiply
+ multiply
+ multiply
+ rshift
+ subtract
+ subtract
+ subtract
+ $bit
+ $digit
+ $digit[$j]
+ $digit[$j]
+ $mask
+ $msb
+ $msb
+ $overflow
+ $overflow
+ $overflow
+ $product_value[$k]
+ $quotient_value[$q_index]
+ $quotient_value[$q_index]
+ $quotient_value[$x_max - $y_max]
+ $remaining
+ $remaining
+ $remaining
+ $remaining
+ $remaining
+ $shift
+ $shift
+ $square_value[$i2]
+ $square_value[$k]
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $sum
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $tempmask
+ $tempmask
+ $tempoverflow
+ $tempsplit
+ $tempsplit
+ $this->value[$digit]
+ $this->value[$i]
+ $this->value[$i]
+ $this->value[$i]
+ $this->value[0]
+ $this->value[0]
+ $val[$i]
+ $val[$i]
+ $val[$i] & $tempmask
+ $value[$i]
+ $value[$i]
+ $value[$i]
+ $value[$j]
+ $x
+ $x
+ $x_value[$i]
+ $x_value[$i]
+ $x_value[$i]
+ $x_value[$j]
+ $x_value[$j]
+ $x_value[$j]
+ $x_value[$j]
+ $x_window[0] * static::BASE_FULL
+ ($x_value[$j] + $y_value[$j]) * static::BASE_FULL
+ ($x_value[$j] - $y_value[$j]) * static::BASE_FULL
+ ((static::MAX10LEN - 1) * strlen($x)) % static::MAX10LEN
+ (static::MAX10LEN - 1) * strlen($x)
+ 1 << $overflow
+ 1 << $overflow
+ 1 << $shift
+ 1 << $tempoverflow
+ 2 * $value[$j]
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE
+ static::BASE_FULL
+ static::BASE_FULL
+ static::BASE_FULL
+ static::BASE_FULL
+ static::BASE_FULL
+ static::BASE_FULL
+ static::BASE_FULL
+ static::BASE_FULL
+ static::BASE_FULL
+ static::MAX10LEN
+ ~$r_value[$i]
+ ~$this->value[0]
+ $lhs
+ $lhs
+ $mod->value
+ $rhs->value
+ $temp->value
+ $temp->value
+ $temp->value
+ $x->value
+ $x->value
+ static::$isValidEngine
+ $class::powModHelper($this, $e, $n, static::class)
+ $temp
+ $xx[self::VALUE]
+ $xy[self::VALUE]
+ array_reverse($vals)
+ list<int>
+ $this->value[$i]
+ $this->value[0]
+ $this->value[count($this->value)]
+ $val[$i]
+ $val[$i]
+ list<static>
+ static
+ pack('N', $x)
+ $r_value
+ $result->bitmask->value
+ $temp->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $val
+ $val
+ $val
+ $val
+ $value
+ $value
+ $value
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x->value
+ $y->value
+ $y->value
+ $y->value
+ $y_value
+ $y_value
+ $r_value[$i]
+ $result->bitmask->value[$i]
+ $this->value[$i]
+ $this->value[$i]
+ $this->value[0]
+ $this->value[0]
+ $this->value[0]
+ $val[$i]
+ $val[$i]
+ $value[0]
+ $x[0]
+ $y->value[0]
+ $y->value[count($y->value) - 1]
+ $y_value[$y_max - 1]
+ $y_value[$y_max]
+ $this->value[$i]
+ $this->value[$i]
+ $this->value[0]
+ $this->value[count($this->value)]
+ $val[$i]
+ $val[$i]
+ $val[]
+ $x
+ $x
+ ~$r_value[$i]
+ ~$this->value[0]
+ $result->bitmask->value
+ $arr[self::SIGN]
+ $arr[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $this->value[0]
+ $this->value[0]
+ $this->value[0]
+ $value[0]
+ $x[0]
+ $xx[self::SIGN]
+ $xx[self::VALUE]
+ $xx[self::VALUE]
+ $xy[self::SIGN]
+ $xy[self::VALUE]
+ $xy[self::VALUE]
+ $y->value[0]
+ $y_value[0]
+ $z1[self::SIGN]
+ $z1[self::SIGN]
+ $z1[self::VALUE]
+ $z1[self::VALUE]
+ $z1[self::VALUE]
+ $z1[self::VALUE]
+ compare
+ divide
+ equals
+ multiply
+ multiply
+ multiply
+ multiply
+ subtract
+ subtract
+ $j
+ $mask
+ $tempmask
+ abs
+ bitwise_leftShift
+ bitwise_rightShift
+ isNegative
+ isOdd
+ make_odd
+ negate
+ pad
+ powModInner
+ scan1divide
+ square
+ testBit
+ testSmallPrimes
+ toBytes
+ toString
+ PHP
+ PHP
+ PHP
+ static::$isValidEngine
+ (string) $mod->value[0]
+ $value[$i]
+ $value[$i]
+ ''
+ static::BASE
static::BASE
@@ -268,8 +13566,82 @@
subtract
subtract
+ new static($this->int2bytes((int) substr($x, 0, static::MAX10LEN)), 256)
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static()
+ new static(1)
+ new static(Hex::decode($x), 256)
+ $digit
+ $x_max
+ $x_size
+ $class
+ $temp
+ static::slidingWindow($x, $e, $n, $class)
+ $class::multiplyHelper($x, false, $y, false)
+ $class::square($x)
+ $class::square($x->value)
+ new $class()
+ new $class()
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp[self::VALUE]
+ $temp
+ [, $temp]
+ [, $temp]
+ array
+ array
+ array
+ divide
+ static::reduce($class::square($x), $n, $class)
+ static::reduce($temp[self::VALUE], $n, $class)
+ static::reduce($x, $n, $class)
+ isValidEngine
+ multiplyReduce
+ prepareReduce
+ squareReduce
+ divide
static::reduce($class::square($x), $n, $class)
@@ -278,35 +13650,984 @@
$n->value
+ $n->value[$i]
+ $n->value[$i]
+ $result
+ $j
+ $result
+ $result
+ $result
+ $temp
+ $temp
+ $y1
+ $y2
+ [, $result]
+ T
+ add
+ divide
+ multiply
+ multiply
+ $class::BASE
+ $n->value[0]
+ $result
+ strrpos($temp, '1')
+ $n->value[0]
+ $n->value[0]
+ $n->value
+ lshift
+ modInverse
+ multiply
+ multiply
+ $j
+ $n->value
modInverse
rshift
new $class()
+ new $class()
+ OpenSSL
+ $class::addHelper($result, false, $corrector_value, false)
+ $class::multiplyHelper($temp, false, $cache[self::DATA][$key], false)
+ $class::subtractHelper($result, false, $temp[self::VALUE], $temp[self::SIGN])
+ $class::subtractHelper($result[self::VALUE], $result[self::SIGN], $n, false)
+ new $class()
+ new $class()
+ new $class()
+ new $class()
+ $cache[self::DATA][$key]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cutoff
+ $cutoff
+ $m
+ $m1
+ $m_length - 1
+ $n
+ $n
+ $n[self::VALUE]
+ $n[self::VALUE]
+ $result[self::SIGN]
+ $result[self::SIGN]
+ $result[self::SIGN]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $temp[self::SIGN]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $u
+ ($m_length >> 1) + 1
+ $lsd
+ $product_value
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $m1
+ $result[self::SIGN]
+ $result[self::SIGN]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $temp
+ $temp
+ $temp
+ $temp[self::VALUE]
+ $u
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::DATA][$key]
+ $cache[self::DATA][$key]
+ $cache[self::DATA][]
+ $carry
+ $carry
+ $cutoff
+ $key
+ $key
+ $lhs_value
+ $m1
+ $product_value[$j]
+ $product_value[$k]
+ $result
+ $result
+ $result
+ $result
+ $temp
+ $temp
+ $temp
+ $u
+ [$temp, ]
+ [$u, $m1]
+ [, $temp]
+ [, $temp]
+ array
+ array
+ $class::addHelper($lsd, false, $temp[self::VALUE], false)
+ $class::multiplyHelper($msd, false, $m1, false)
+ $class::multiplyHelper($temp, false, $m, false)
+ $class::multiplyHelper($temp, false, $u, false)
+ $class::subtractHelper($n[self::VALUE], false, $temp[self::VALUE], false)
+ $class::subtractHelper($result[self::VALUE], $result[self::SIGN], $m, false)
+ divide
+ divide
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $m_length
+ $m_length
+ $m_length
+ $product_value[$k]
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $x_value[$j]
+ $x_value[$j]
+ $m1->value
+ $temp->value
+ $temp->value
+ $temp->value
+ $u->value
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $temp->value
+ $temp->value
+ $n[self::VALUE]
+ $result[self::SIGN]
+ $result[self::SIGN]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $temp[self::SIGN]
+ $temp[self::SIGN]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $temp[self::VALUE]
+ $y_value[0]
+ $m1
+ $u
+ divide
divide
new $class()
+ new $class()
+ new $class()
+ new $class()
+ Barrett
+ $key
+ new $class()
+ new $class()
+ $temp
+ [, $temp]
+ array
+ divide
+ $temp->value
+ $temp->value
+ Classic
+ new $class()
+ new $class()
+ new $class()
+ $custom_reduction
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::MAX_DIGIT2
+ $class::MAX_DIGIT2
+ $class::MAX_DIGIT2
+ $class::MAX_DIGIT2
+ $known[$j] * $class::BASE_FULL + $known[$i]
+ $m
+ $m->value
+ $m1
+ $u
+ $m1
+ $u
+ $u
+ $inline
+ $lhs_value
+ $m1
+ $u
+ $u
+ [$u, $m1]
+ [$u]
+ self::$custom_reduction
+ self::$custom_reduction
+ $inline($n)
+ array
+ callable
+ divide
+ divide
+ $arr[$i]
+ $arr[$j]
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $class::MAX_DIGIT
+ $class::MAX_DIGIT
+ $class::MAX_DIGIT
+ $known[$i]
+ $known[$i]
+ $known[$i]
+ $known[$j]
+ $m1->value
+ $u->value
+ $u->value
+ $func
+ $func
+ $inline($n)
+ $m
+ $m
+ $m
+ $m
+ $m
+ $m
+ $m
+ $m
+ $m
+ $m
+ $m->value
+ $m->value
+ $m
+ $m->value
+ generateCustomReduction
+ reduce
+ $m
$m->value
$class::addHelper($result[self::VALUE], false, $temp, false)
+ $class::regularMultiply([$temp], $n)
+ $class::subtractHelper($result[self::VALUE], false, $n, false)
+ new $class()
+ new $class()
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $result
+ $result * (2 - fmod($x * $result, $class::BASE_FULL))
+ $result[self::VALUE]
+ $temp
+ $x * $result
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $result[self::VALUE]
+ $temp
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $result[self::VALUE]
+ $cache[self::DATA][$key]
+ $key
+ $result
+ $result
+ $result
+ $result
+ $result
+ $result
+ $result
+ $temp
+ $temp
+ $temp
+ $x
+ [, $temp]
+ array
+ array
+ int
+ divide
+ $class::BASE_FULL
+ $class::MAX_DIGIT
+ $result
+ $result
+ $result
+ $result
+ $result
+ $result[self::VALUE][$i]
+ $temp
+ $temp
+ $temp
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ ($x & 0xFF) * $result
+ ($x & 0xFFFF) * $result
+ ($x * $result) % $class::BASE_FULL
+ 2 - ($x & 0xFFFF) * $result
+ $temp->value
+ $result & $class::MAX_DIGIT
+ $result[self::VALUE]
+ $temp->value
+ $result[self::VALUE]
+ $x[0]
+ reduce
+ $a[self::VALUE]
+ $a[self::VALUE]
+ $a[self::VALUE]
+ $a[self::VALUE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $temp[self::VALUE]
+ $a[self::VALUE][0]
+ $cache[self::DATA]
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::VARIABLE]
+ $cache[self::DATA]
+ $cache[self::VARIABLE]
+ $cache[self::DATA][$key]
+ $key
+ $temp
+ $temp
+ $temp
+ $temp
+ array
+ $a[self::VALUE][0]
+ $class::BASE_FULL
+ $class::BASE_FULL
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $y[0]
+ $a[self::VALUE]
+ $class
+ $m
$a[self::VALUE]
+ $a[self::VALUE]
+ $a[self::VALUE]
+ $a[self::VALUE]
+ $a[self::VALUE]
+ $temp[self::VALUE]
+ $y[0]
+ MontgomeryMult
+ new $class()
+ new $class()
+ new $class()
+ $result
+ array
+ bitwise_and
+ subtract
+ $result->value
+ $result->value
+ $this->powModOuter($e, $n)
+ $this->powModOuter($e, $n)
+ PHP32
+ PHP32
+ $this->bitwiseAndHelper($x)
+ $this->bitwiseOrHelper($x)
+ $this->bitwiseXorHelper($x)
+ $this->extendedGCDHelper($n)
+ $this->powHelper($n)
+ self::maxHelper($nums)
+ self::minHelper($nums)
+ self::randomRangeHelper($min, $max)
+ $digit
+ $digit
+ $vals[]
+ $digit
+ $digit
+ PHP32
+ PHP32
+ PHP32
+ PHP32
+ PHP32
+ PHP32
+ PHP32
+ PHP32[]
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $val
+ $val
+ $val
+ $y->value
+ $y->value
+ $y->value
+ $y->value
+ $digit
+ $val
+ $val
+ $this->extendedGCD($n)['gcd']
+ between
+ bitwise_and
+ bitwise_or
+ bitwise_xor
+ divide
+ equals
+ gcd
+ max
+ min
+ modInverse
+ modPow
+ multiply
+ pow
+ powMod
+ randomRange
+ randomRangePrime
+ subtract
+ PHP32
+ PHP32
+ $this->powModOuter($e, $n)
+ PHP64
+ $this->bitwiseAndHelper($x)
+ $this->bitwiseOrHelper($x)
+ $this->bitwiseXorHelper($x)
+ $this->extendedGCDHelper($n)
+ $this->powHelper($n)
+ self::maxHelper($nums)
+ self::minHelper($nums)
+ self::randomRangeHelper($min, $max)
+ $val[$i - 1]
+ $digit
+ $digit
+ $digit
+ $digit
+ $vals[]
+ $digit
+ $digit
+ $digit
+ $digit
+ PHP64
+ PHP64
+ PHP64
+ PHP64
+ PHP64
+ PHP64
+ PHP64
+ PHP64[]
+ $this->value
+ $this->value
+ $this->value
+ $this->value
+ $val
+ $val
+ $val
+ $y->value
+ $y->value
+ $y->value
+ $y->value
+ $digit
+ $val[$i - 1]
+ $val
+ $val
+ $this->extendedGCD($n)['gcd']
+ between
+ bitwise_and
+ bitwise_or
+ bitwise_xor
+ divide
+ equals
+ gcd
+ max
+ min
+ modInverse
+ modPow
+ multiply
+ pow
+ powMod
+ randomRange
+ randomRangePrime
+ subtract
+ PHP64
+ PHP64
+ $val
$c
+ function ($c) use ($u, $mStart, $m, $t, $finalMask, $pad, $h) {
+ $indices
+ $c
+ $m
+ $one
+ $val[$index]
+ $index
+ $m
+ gmp_import($x)
+ $m
+ getLength
+ getLengthInBytes
+ randomInteger
+ pack('J', $z)
+ string
+ string
+ $instanceID
+ $instanceID
+ $instanceID
+ $num
+ $x
+ $x
+ $x
+ $y
+ $y
+ $y
+ $z
+ $num
+ $r
+ $r
+ $x
+ $x
+ $y
+ $y
+ $y
+ $z
+ static::$modulo[$instanceID]
+ static::$reduce[$instanceID]
+ static::$reduce[$instanceID]
+ $r
+ $this->instanceID
+ $this->value
+ $x
+ $x0
+ $x1
+ $x2
+ $x3
+ $y
+ $y0
+ $y1
+ $y2
+ $y3
+ $z
+ $z0
+ $z0
+ $z1
+ $z1
+ $z2
+ $z2
+ $z3
+ $z3
+ $x
+ $x
+ $x
+ $x
+ $x0
+ $x0
+ $x0
+ $x0
+ $x1
+ $x1
+ $x1
+ $x1
+ $x2
+ $x2
+ $x2
+ $x2
+ $x3
+ $x3
+ $x3
+ $x3
+ $y
+ $y
+ $y
+ $y
+ $z0
+ $z0
+ $z1
+ $z2
+ $z3
+ ($x0 * $y0) ^ ($x1 * $y3)
+ ($x0 * $y1) ^ ($x1 * $y0)
+ ($x0 * $y2) ^ ($x1 * $y1)
+ ($x0 * $y3) ^ ($x1 * $y2)
+ unpack('N', $x)[1]
+ unpack('N', $y)[1]
+ unpack('N', $x)[1]
+ unpack('N', $y)[1]
+ compare
+ divide
+ equals
+ negate
+ subtract
+ toBits
+ (string) $this->toBigInteger()
+ !isset($q)
+ new static($this->instanceID)
+ new static($this->instanceID)
+ new static($this->instanceID, $x ^ $y)
+ new static($this->instanceID, $x ^ static::$modulo[$this->instanceID])
+ new static($this->instanceID, static::polynomialMultiply($this->value, $y->value))
+ jsonSerialize
+ toHex
+ $one
+ getLength
+ getLengthInBytes
+ randomInteger
+ setReduction
+ $this->modulo
+ $this->reduce
+ $instanceID
+ $length
+ $one
+ $two
+ static::$zero[static::class]
+ static::$zero[static::class]
+ static::$zero[static::class]
+ static::$modulo[$instanceID]
+ static::$reduce[$instanceID]
+ $this->value
+ clone static::$zero[static::class]
+ static::$reduce
+ compare
+ equals
+ getNAF
+ isOdd
+ pow
+ toBits
+ static::$zero
static::$zero
@@ -315,5 +14636,4021 @@
static::$zero
static::$zero
new static($this->instanceID)
+ new static($this->instanceID)
+ new static($this->instanceID)
+ new static($this->instanceID, $r)
+ new static($this->instanceID, $this->value->multiply($denominator))
+ new static($this->instanceID, $this->value->multiply($x->value))
+ new static($this->instanceID, static::$modulo[$this->instanceID]->subtract($this->value))
+ false
+ false
+ false
+ false
+ false
+ array
+ array|string
+ int
+ bool
+ $request_id
+ $value
+ chmod
+ fileatime
+ filegroup
+ filemtime
+ fileowner
+ fileperms
+ filesize
+ get_lstat_cache_prop
+ get_stat_cache_prop
+ get_xstat_cache_prop
+ parseLongname
+ query_stat_cache
+ readlink
+ realpath
+ $a['filename']
+ $attr['mode']
+ $b['filename']
+ $content
+ $dir
+ $dir
+ $dir
+ $dir
+ $dir
+ $dir
+ $dir
+ $dir
+ $dir
+ $filename
+ $filename
+ $filename
+ $filename
+ $filename
+ $filename
+ $filename
+ $filename
+ $flags
+ $flags
+ $flags
+ $flags
+ $fp
+ $fp
+ $fp
+ $fp
+ $fp
+ $fp
+ $fp
+ $length
+ $length + $res_offset
+ $link
+ $link
+ $link
+ $link
+ $longname
+ $newname
+ $newname
+ $oldname
+ $oldname
+ $path
+ $path
+ $path
+ $remote_file
+ $remote_file
+ $remote_file
+ $stat['atime']
+ $stat['atime']
+ $stat['mtime']
+ $stat['mtime']
+ $status
+ $status
+ $status
+ $status
+ $status
+ $status
+ $status
+ $status
+ $status
+ $status
+ $status
+ $stop - $start
+ $temp
+ $temp
+ $this->extensions['versions']
+ $this->pwd
+ $this->realpath($dir . '/' . $key)
+ $this->realpath($dir . '/' . $value)
+ $this->realpath($path)
+ $this->realpath($path)
+ $this->server_channels[self::CHANNEL]
+ $this->server_channels[self::CHANNEL]
+ $props['type']
+ $props['type']
+ $result->{$type}[$prop]
+ $temp[$dir]
+ $temp[$dir]
+ $this->requestBuffer[$request_id]['packet']
+ $this->requestBuffer[$request_id]['packet_type']
+ $attr[$key]
+ $temp[$dir]
+ $temp[$dir]
+ $attr[$key]
+ $contents[$shortname]
+ $this->extensions[$key]
+ $this->requestBuffer[$packet_id]
+ $this->requestBuffer[$request_id]
+ $a[$sort]
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr[$key]
+ $attributes['type']
+ $b[$sort]
+ $depth
+ $depth
+ $dir
+ $dir
+ $dir
+ $dir
+ $fileType
+ $filename
+ $filename
+ $filename
+ $filename
+ $filename
+ $key
+ $length
+ $link
+ $link
+ $newname
+ $offset
+ $oldname
+ $order
+ $path
+ $path
+ $path
+ $props
+ $props
+ $remote_file
+ $remote_file
+ $res_offset
+ $response
+ $response
+ $response
+ $result
+ $result
+ $result
+ $result
+ $result
+ $result
+ $result
+ $size
+ $size
+ $size
+ $size
+ $subtemp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp[$dir]
+ $temp['extensions']
+ $this->packet_type
+ $this->pwd
+ $this->queueSize
+ $this->uploadQueueSize
+ $type
+ $value
+ $value
+ array
+ array|false
+ array|false
+ bool
+ int
+ string
+ string
+ string|bool
+ $a[$sort]
+ $a[$sort]
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr
+ $b[$sort]
+ $b[$sort]
+ $content
+ $depth
+ $depth
+ $key
+ $key
+ $length
+ $offset
+ $res_offset
+ $shortname
+ $shortname
+ $size
+ $size
+ $start
+ $subtemp
+ $temp
+ $temp
+ $this->realpath($dir . '/..')
+ $value
+ $value
+ $value
+ $value
+ $value
+ $result['.']->lstat
+ $result['.']->stat
+ $attr
+ $content ?? true
+ $order === SORT_ASC ? $a[$sort] - $b[$sort] : $b[$sort] - $a[$sort]
+ $result
+ $result->lstat
+ $result->stat
+ $result['.']->lstat
+ $result['.']->stat
+ $temp
+ count($this->sftp_errors) ? $this->sftp_errors[count($this->sftp_errors) - 1] : ''
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr
+ $fp
+ $fp
+ $packet
+ $packet
+ $packet
+ $this->server_identifier
+ pack('Na*', strlen($handle), $handle)
+ pack('Na*', strlen($path), $path)
+ unpack('Nlength', Strings::shift($this->packet_buffer, 4))
+ unpack('Npacket_id', Strings::shift($this->packet_buffer, 4))
+ $attr
+ $this->pwd
+ false
+ false
+ $data
+ $data
+ $data
+ $data
+ $data
+ $local_file
+ $local_file
+ $stat['atime']
+ $stat['atime']
+ $stat['atime']
+ $stat['mtime']
+ $stat['mtime']
+ $stat['mtime']
+ $stat['size']
+ $this->stat($remote_file)['size']
+ $data
+ $data
+ $data
+ $data
+ $data
+ $fp
+ $fp
+ preg_replace('#/(?=/)|/$#', '', $dir)
+ preg_replace('#^/|/(?=/)|/$#', '', $path)
+ preg_replace('#^/|/(?=/)|/$#', '', $path)
+ preg_replace('#^/|/(?=/)|/$#', '', $path)
+ $dirs[0]
+ $this->channel_status[self::CHANNEL]
+ $this->server_channels[self::CHANNEL]
+ $a['filename']
+ $a['filename']
+ $a['filename']
+ $a['filename']
+ $a['filename']
+ $attrs['mode']
+ $b['filename']
+ $b['filename']
+ $b['filename']
+ $b['filename']
+ $stat['atime']
+ $stat['atime']
+ $stat['atime']
+ $stat['mtime']
+ $stat['mtime']
+ $stat['mtime']
+ $stat['size']
+ $stat['size']
+ $stat['type']
+ $this->stat($remote_file)['size']
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr
+ $attr
+ $content
+ $content
+ $fp
+ $fp
+ $longname
+ $result
+ chgrp
+ chown
+ clearStatCache
+ disableArbitraryLengthPackets
+ disableDatePreservation
+ disablePathCanonicalization
+ enableArbitraryLengthPackets
+ enableDatePreservation
+ enablePathCanonicalization
+ enableStatCache
+ file_exists
+ fileatime
+ filegroup
+ filemtime
+ fileowner
+ fileperms
+ filetype
+ get
+ getLastSFTPError
+ getNegotiatedVersion
+ getSFTPErrors
+ getSFTPLog
+ getSupportedVersions
+ is_dir
+ is_file
+ is_link
+ is_readable
+ is_writeable
+ rawlist
+ readlink
+ rename
+ rmdir
+ setListOrder
+ setPreferredVersion
+ symlink
+ touch
+ truncate
+ bool
+ $defaultVersion
+ $version
+ (int) $ver
+ $fileType !== false
+ $this->version < 4 && $fileType !== false
+ !is_string($path)
+ is_int($filename)
+ is_object($path)
+ is_string($mode)
+ is_string($mode) && is_int($filename)
+ break;
+ $key
+ bool
+ int
+ $attrib_bits
+ $attrib_bits_valid
+ $flag
+ $mask
+ $packet
+ $response
+ $response
+ $response
+ $temp
+ $text_hint
+ $type
+ $value
+ $who
+ $path === false
+ $path === false
+ $path === false
+ $path === false
+ $path === false
+ $path === false
+ $path === false
+ $path_from === false
+ false
+ false
+ false
+ false
+ false
+ bool
+ $var
+ _dir_readdir
+ _stream_read
+ $host
+ $host
+ $host
+ $orig
+ $orig
+ $pass
+ $pass
+ $port
+ $result
+ $result
+ $user
+ $user
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $var[0]
+ $var[1]
+ self::$instances[$host][$port]
+ self::$instances[$host][$port]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ $context[$scheme]
+ self::$instances[$host][$port]
+ self::$instances[$host][$port]
+ $argument
+ $atime
+ $pass
+ $pass
+ $result
+ $result
+ $results
+ $results
+ $sftp
+ $sftp
+ $this->entries
+ $this->notification
+ $this->pos
+ $this->sftp
+ $this->size
+ $time
+ $user
+ bool
+ bool
+ bool
+ bool
+ bool
+ resource
+ string
+ chgrp
+ chmod
+ chown
+ delete
+ delete
+ filesize
+ get
+ lstat
+ mkdir
+ nlist
+ put
+ rename
+ rename
+ rmdir
+ stat
+ stat
+ stat
+ touch
+ touch
+ truncate
+ truncate
+ $fragment
+ $path
+ $path
+ $path
+ $path
+ $query
+ $path
+ $path
+ $results
+ $results
+ $this->sftp->chgrp($path, $var)
+ $this->sftp->chown($path, $var)
+ $this->sftp->delete($path, false)
+ $this->sftp->fsock
+ $this->sftp->mkdir($path, $mode, $options & STREAM_MKDIR_RECURSIVE)
+ $this->sftp->rmdir($path)
+ $this->sftp->touch($path, $time, $atime)
+ parse_url($path)
+ $path1['path']
+ $path2['path']
+ $path_to['path']
+ $host
+ $this->mode[0]
+ $this->mode[0]
+ $this->mode[0]
+ preg_replace('#[bt]$#', '', $mode)
+ $path_to['path']
+ __call
+ __construct
+ $path
+ $instances
+ $context
+ $entries
+ $eof
+ $mode
+ $notification
+ $path
+ $pos
+ $sftp
+ $size
+ isset($this->notification) && is_callable($this->notification)
+ isset($this->notification) && is_callable($this->notification)
+ isset($this->notification) && is_callable($this->notification)
+ isset($this->notification) && is_callable($this->notification)
+ isset($this->notification)
+ isset($this->notification)
+ $arg1
+ $arg2
+ $cast_as
+ $operation
+ $option
+ $options
+ $options
+ $arg instanceof Agent
+ $arg instanceof PrivateKey || $arg instanceof Agent
+ $request_channel === false
+ $this->session_id === false
+ is_array($arg)
+ is_array($arg)
+ is_array($arg)
+ is_null($this->exit_status)
+ false
+ false
+ self::$crypto_engine
+ self::$crypto_engine
+ true
+ $payload[0]
+ int
+ string
+ bool|SSH2
+ array{Hash, int}|null
+ string
+ $algorithm
+ $host
+ $password
+ $timeout
+ $curTimeout
+ $keepAlive
+ $quiet_mode
+ $realtime_log_wrap
+ $timeout
+ connect
+ get_channel_packet
+ $a['comp']
+ $a['crypt']
+ $a['mac']
+ $aad
+ $auth
+ $auth_methods
+ $c2s_compression_algorithms
+ $c2s_compression_algorithms
+ $c2s_encryption_algorithms
+ $c2s_encryption_algorithms
+ $c2s_mac_algorithms
+ $c2s_mac_algorithms
+ $c2s_mac_algorithms
+ $channel
+ $current_log
+ $data
+ $decrypt
+ $encrypt
+ $error_message
+ $extra
+ $filename
+ $gBytes
+ $gBytes
+ $kex_algorithms
+ $kex_algorithms
+ $key
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $length
+ $length
+ $m
+ $m
+ $mac_algorithm_in
+ $mac_algorithm_in
+ $mac_algorithm_out
+ $mac_algorithm_out
+ $matches[0]
+ $matches[3]
+ $max_size
+ $nonce
+ $ourPublicBytes
+ $p
+ $p
+ $packet
+ $packet[0]
+ $password
+ $password
+ $payload
+ $payload[0]
+ $preferred['hostkey']
+ $preferred['kex']
+ $primeBytes
+ $primeBytes
+ $prompt
+ $raw
+ $reason_code
+ $reconstructed
+ $remaining_length
+ $responses[$i]
+ $s2c_compression_algorithms
+ $s2c_compression_algorithms
+ $s2c_encryption_algorithms
+ $s2c_encryption_algorithms
+ $s2c_mac_algorithms
+ $s2c_mac_algorithms
+ $s2c_mac_algorithms
+ $server_channel
+ $server_host_key_algorithms
+ $server_host_key_algorithms
+ $server_public_host_key
+ $signature
+ $signature
+ $skip_channel_filter
+ $skip_channel_filter
+ $stop - $start
+ $temp
+ $temp
+ $temp['length']
+ $theirPublicBytes
+ $theirPublicBytes
+ $this->channel_buffers[$client_channel]
+ $this->compression_algorithms_client_to_server
+ $this->compression_algorithms_server_to_client
+ $this->curTimeout
+ $this->curTimeout
+ $this->curTimeout == 0 ? 100000 : $this->curTimeout
+ $this->encryption_algorithms_client_to_server
+ $this->encryption_algorithms_server_to_client
+ $this->keepAlive
+ $this->keepAlive
+ $this->kex_algorithm
+ $this->kex_algorithm
+ $this->kex_algorithm
+ $this->kex_algorithm
+ $this->kex_algorithm
+ $this->kex_algorithms
+ $this->mac_algorithms_client_to_server
+ $this->mac_algorithms_server_to_client
+ $this->message_number_log[count($this->message_number_log) - 1]
+ $this->preferred['hostkey']
+ $this->server_channels[$client_channel]
+ $this->server_channels[$request_channel]
+ $this->server_channels[self::CHANNEL_EXEC]
+ $this->server_channels[self::CHANNEL_EXEC]
+ $this->server_channels[self::CHANNEL_SHELL]
+ $this->server_channels[self::CHANNEL_SHELL]
+ $this->server_channels[self::CHANNEL_SUBSYSTEM]
+ $this->server_host_key_algorithms
+ $this->server_public_host_key
+ $this->signature
+ $type
+ $type
+ $type
+ array_shift($this->channel_buffers[$client_channel])
+ array_shift($this->message_log)
+ $diff
+ $key
+ $a['comp']
+ $a['crypt']
+ $a['mac']
+ $keyBytes[0]
+ $m[$subkey]
+ $matches[0]
+ $matches[1]
+ $matches[3]
+ $matches[3]
+ $packet[0]
+ $this->channel_buffers[$client_channel][$i]
+ $a['comp']
+ $a['crypt']
+ $a['mac']
+ $this->channel_buffers[$channel][]
+ $this->channel_buffers[$channel][]
+ $this->channel_buffers[$channel][]
+ $compression_map[$compression_algorithm_in]
+ $compression_map[$compression_algorithm_out]
+ $this->channel_buffers[$channel]
+ $this->channel_buffers[$channel]
+ $this->channel_buffers[$channel]
+ $this->channel_buffers[$client_channel][$i]
+ $this->channel_status[$channel]
+ $this->channel_status[$channel]
+ $this->channel_status[$channel]
+ $this->channel_status[$channel]
+ $this->server_channels[$channel]
+ $this->server_channels[$channel]
+ $this->server_channels[$channel]
+ $this->server_channels[$channel]
+ $this->window_size_client_to_server[$channel]
+ $this->window_size_client_to_server[$channel]
+ $this->window_size_server_to_client[$channel]
+ $this->window_size_server_to_client[$channel]
+ $this->window_size_server_to_client[$channel]
+ $a
+ $algo
+ $auth
+ $c2s_compression_algorithms
+ $c2s_encryption_algorithms
+ $c2s_mac_algorithms
+ $compression_algorithm_in
+ $compression_algorithm_out
+ $current_log
+ $curveName
+ $decrypt
+ $encrypt
+ $expected_key_format
+ $extra
+ $filename
+ $i
+ $kex_algorithms
+ $key
+ $keyBytes
+ $length
+ $m
+ $mac_algorithm_in
+ $mac_algorithm_out
+ $max_size
+ $method
+ $newargs[]
+ $ourPublicBytes
+ $p
+ $packet
+ $privatekey
+ $privatekey
+ $privatekey
+ $privatekey
+ $publickey
+ $reconstructed
+ $response
+ $response
+ $response
+ $responses[]
+ $result
+ $s2c_compression_algorithms
+ $s2c_encryption_algorithms
+ $s2c_mac_algorithms
+ $server_host_key_algorithm
+ $server_host_key_algorithms
+ $signature
+ $temp
+ $temp
+ $temp[$key]
+ $this->auth_methods_to_continue
+ $this->auth_methods_to_continue
+ $this->auth_methods_to_continue
+ $this->auth_methods_to_continue
+ $this->auth_methods_to_continue
+ $this->hmac_check_name
+ $this->hmac_check_name
+ $this->hmac_create_name
+ $this->hmac_create_name
+ $this->kex_algorithm
+ $this->last_interactive_response
+ $this->server_public_host_key
+ $value
+ $value
+ $value
+ $window_size
+ $window_size
+ bool
+ boolean
+ string|bool|null
+ decrypt
+ encrypt
+ getCurve
+ getEncodedCoordinates
+ setNonce
+ setNonce
+ sign
+ withHash
+ $curveName
+ $data
+ $data
+ $data
+ $data
+ $elapsed
+ $keyBytes
+ $keyBytes[0]
+ $message
+ $message_number_log[$i]
+ $raw
+ $raw
+ $raw
+ $raw
+ $response
+ $server_host_key_algorithm
+ $stop
+ $temp
+ $temp
+ $temp
+ $temp
+ $temp
+ $this->curTimeout
+ $this->curTimeout
+ $this->curTimeout
+ $this->curTimeout
+ $this->curTimeout
+ $this->curTimeout
+ $this->curTimeout
+ $this->errors[count($this->errors) - 1]
+ $this->window_size_client_to_server[$channel]
+ $this->window_size_client_to_server[$client_channel]
+ $this->window_size_server_to_client[$channel]
+ $this->window_size_server_to_client[$channel]
+ $window_size
+ $window_size
+ $result
+ $this->errors[$count - 1]
+ $this->get_channel_packet($channel)
+ $this->quiet_mode
+ $temp
+ $this->errors
+ array<string, SSH2>
+ string[]
+ self::$connections[$id] instanceof \WeakReference ? self::$connections[$id]->get() : self::$connections[$id]
+ $data
+ $logged
+ $nonce
+ $packet
+ $packet
+ $packet
+ $packet
+ $packet
+ $packet
+ $packet
+ $packet
+ $packet
+ $packet
+ $packet
+ $payload
+ $payload
+ $raw
+ $raw
+ $raw
+ $raw
+ $raw
+ $raw
+ $raw
+ $reconstructed
+ $tag
+ $tag
+ $this->server_host_key_algorithms
+ $this->server_identifier
+ pack('C', MessageType::REQUEST_FAILURE)
+ pack('CN', MessageType::CHANNEL_CLOSE, $this->server_channels[$channel])
+ pack('CN', MessageType::CHANNEL_CLOSE, $this->server_channels[$channel])
+ pack('CN', MessageType::CHANNEL_CLOSE, $this->server_channels[$client_channel])
+ pack('CN', MessageType::CHANNEL_CLOSE, $this->server_channels[$client_channel])
+ pack('CN', MessageType::CHANNEL_EOF, $this->server_channels[$client_channel])
+ pack('CN', MessageType::CHANNEL_EOF, $this->server_channels[$client_channel])
+ pack('CN', MessageType::CHANNEL_SUCCESS, $this->server_channels[$channel])
+ pack('CN', MessageType::IGNORE, 0)
+ pack('CN', MessageType::IGNORE, 0)
+ pack('Na*', $this->get_seq_no, $reconstructed)
+ pack('Na*', $this->send_seq_no, $packet)
+ pack('Na*', $this->send_seq_no, $packet)
+ unpack('Npacket_length', $temp = Strings::shift($raw, 4))
+ unpack('Npacket_length', $temp)
+ unpack('Npacket_length', $temp)
+ unpack('Npacket_length/Cpadding_length', Strings::shift($raw, 5))
+ unpack('cpacket_type/Nchannel/Nlength', $payload)
+ $dh_group_sizes_packed
+ $kexinit_payload_client
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $keyBytes
+ $logged
+ $packet
+ $packet
+ deflate_add($this->compress_context, $data, ZLIB_PARTIAL_FLUSH)
+ ftell($this->realtime_log_file)
+ pack('N', $this->get_seq_no)
+ pack('N', $this->send_seq_no)
+ pack('N', $this->send_seq_no)
+ $fp
+ $this->hmac_create = false
+ @fsockopen($this->host, $this->port, $errno, $errstr, $this->curTimeout == 0 ? 100000 : $this->curTimeout)
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ false
+ inflate_init(ZLIB_ENCODING_RAW, ['window' => $cinfo + 8])
+ $args
+ $engine
+ $response
+ $response
+ $response
+ $response
+ $response
+ $response
+ $response
+ $response
+ $response
+ $response
+ $response
+ $this->decompress_context
+ $this->fsock
+ $this->fsock
+ $temp['length']
+ $args
+ $this->decryptInvocationCounter
+ $this->encryptInvocationCounter
+ array_shift($this->message_log)
+ $raw
+ $this->decryptFixedPart
+ $this->decryptInvocationCounter
+ $this->encryptFixedPart
+ $this->encryptInvocationCounter
+ self::encryption_algorithm_to_crypt_instance($decrypt)
+ self::encryption_algorithm_to_crypt_instance($decrypt)
+ self::encryption_algorithm_to_crypt_instance($encrypt)
+ self::encryption_algorithm_to_crypt_instance($encrypt)
+ decrypt
+ encrypt
+ getLengthInBytes
+ isValidEngine
+ setKey
+ setKey
+ setNonce
+ usesNonce
+ usesNonce
+ $matches[0]
+ $this->server_channels[self::CHANNEL_EXEC]
+ $this->server_channels[self::CHANNEL_EXEC]
+ $this->server_channels[self::CHANNEL_SHELL]
+ $this->server_channels[self::CHANNEL_SUBSYSTEM]
+ get
+ $temp['length']
+ $elapsed
+ $matches
+ $matches
+ $matches
+ $matches
+ $orig
+ $result
+ $temp
+ disableSmartMFA
+ enableSmartMFA
+ getAlgorithmsNegotiated
+ getAuthMethodsToContinue
+ getBannerMessage
+ getErrors
+ getLastError
+ getLog
+ getServerAlgorithms
+ getStdError
+ getWindowColumns
+ getWindowRows
+ ping
+ reset
+ sendIdentificationStringFirst
+ sendIdentificationStringLast
+ sendKEXINITFirst
+ sendKEXINITLast
+ setCryptoEngine
+ setKeepAlive
+ setPreferredAlgorithms
+ setTerminal
+ setWindowColumns
+ setWindowRows
+ setWindowSize
+ startSubsystem
+ stopSubsystem
+ $preferred_signature_format
+ ($callback is callable ? bool : string|bool)
+ $agent
+ $decompress_context
+ $exit_status
+ $hmac_check_etm
+ $hmac_check_name
+ $hmac_create_etm
+ $hmac_create_name
+ $host
+ $identifier
+ $in_subsystem
+ $last_packet
+ $log_size
+ $port
+ $realtime_log_file
+ $realtime_log_size
+ $server_public_host_key
+ $stdErrorLog
+ $this->session_id !== false
+ Strings::is_stringable($arg)
+ is_bool($agent_response)
+ isset($this->keyboard_requests_responses)
+ isset($this->realtime_log_file) && is_resource($this->realtime_log_file)
+ isset($this->agent)
+ isset($this->agent)
+ isset($this->realtime_log_file)
+ isset($this->realtime_log_file)
+ $payload
+ $payload
+ $payload
+ $payload
+ $payload
+ $payload
+ $payload
+ $response
+ $response
+ $response
+ $response
+ $response
+ $response
+ MessageType::findConstantNameByValue($value = ord($logged[0]), false)
+ $callback === false
+ $hasArray
+ $hasString
+ withPadding
+ withSignatureFormat
+ withSignatureFormat
+ verify
+ break;
+ integer
+ integer
+ integer
+ $a
+ $data_type_code
+ $first_kex_packet_follows
+ $key
+ $response
+ $server_cookie
+ !$this->fsock
+ $this->fsock
+ false
+ pack('Na*', $agent_reply_bytes, $agent_reply_data)
+ string
+ $address
+ $agent_reply_bytes
+ $agent_reply_data
+ $key
+ $key_blob
+ $key_blob
+ $length
+ $packet
+ $temp
+ $this->readBytes(4)
+ $this->readBytes(4)
+ $address
+ $address
+ $agent_data_bytes
+ $agent_reply_bytes
+ $agent_reply_data
+ $agent_reply_data
+ $length
+ $packet
+ $temp
+ $this->expected_bytes
+ $address
+ $agent_data_bytes
+ $agent_data_bytes
+ $key_type
+ $packet
+ $packet
+ unpack('N', $data)
+ unpack('N', $this->readBytes(4))
+ unpack('N', $this->readBytes(4))
+ unpack('a*', $agent_reply_data)
+ fsockopen('unix://' . $address, 0, $errno, $errstr)
+ startSSHForwarding
+ \phpseclib3\System\SSH\Agent
+ $request_channel
+ $request_channel
+ bool
+ $comment
+ $length
+ $packet
+ $signature_blob
+ $this->readBytes(4)
+ $length
+ $packet
+ string
+ self::$curveAliases[$this->key->getCurve()]
+ $signature_blob
+ $signature_blob
+ unpack('N', $this->readBytes(4))
+ self::$curveAliases[$this->key->getCurve()]
+ getCurve
+ withHash
+ withPadding
+ withSignatureFormat
+ $key
+ $key_blob
+ $type
+ readBytes
+ $temp
+ $temp
+ ini_get('mbstring.func_overload')
+ ini_get('mbstring.func_overload')
+ SFTPLargeFileTest
+ SFTPLargeFileTest
+ SFTPLargeFileTest
+ SFTPLargeFileTest
+ $read
+ $this->sftp->pwd()
+ $suffix
+ $suffix
+ $dirs
+ $fp
+ $fp
+ $fp
+ $this->sftp->nlist()
+ SFTPStreamTest
+ SFTPStreamTest
+ SFTPStreamTest
+ SFTPStreamTest
+ $scratchDir
+ $this->scratchDir
+ $this->sftp
+ $this->sftp
+ $length
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $sftp
+ $buffer
+ $exampleData
+ $exampleDataLength
+ $scratchDir
+ demoCallback
+ testChDirOnFile
+ testChDirScratch
+ testChDirUpHome
+ testChModOnFile
+ testDeleteEmptyDir
+ testDeleteRecursiveScratch
+ testExecNlist
+ testFileExistsIsFileIsDirDir
+ testFileExistsIsFileIsDirFile
+ testFileExistsIsFileIsDirFileNonexistent
+ testLinkFile
+ testMkDirScratch
+ testPasswordLogin
+ testPutSizeGetFile
+ testPutSizeGetFileCallback
+ testPwdHome
+ testRawlistDisabledStatCache
+ testReadableWritable
+ testReadlink
+ testResourceXfer
+ testRmDirScratch
+ testRmDirScratchNonexistent
+ testSortOrder
+ testStatLstatCache
+ testStatOnCWD
+ testStatOnDir
+ testStatVsLstat
+ testStatcacheFix
+ testSymlink
+ testTouch
+ testTruncate
+ testTruncateLargeFile
+ testUploadOffsets
+ $length
+ $pwd
+ $sftp->pwd()
+ $sftp->pwd()
+ self::$buffer
+ self::$exampleData
+ self::$scratchDir
+ self::$scratchDir
+ self::$scratchDir
+ $stat2['gid']
+ $stat2['uid']
+ $stat['gid']
+ $stat['gid']
+ $stat['type']
+ $stat['type']
+ $stat['type']
+ $stat['type']
+ $stat['type']
+ $stat['type']
+ $stat['type']
+ $stat['type']
+ $stat['uid']
+ $stat['uid']
+ $cur_size
+ $dirname
+ $file
+ $files
+ $last_size
+ $list
+ $list
+ $list_cache_disabled
+ $list_cache_enabled
+ $lstat
+ $lstat
+ $pwd
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat
+ $stat2
+ self::$buffer
+ chdir
+ chdir
+ chdir
+ chdir
+ chdir
+ chdir
+ chdir
+ chdir
+ chdir
+ chgrp
+ chmod
+ chmod
+ chmod
+ chown
+ clearStatCache
+ clearStatCache
+ clearStatCache
+ delete
+ delete
+ delete
+ disableStatCache
+ disableStatCache
+ enablePTY
+ enableStatCache
+ exec
+ file_exists
+ file_exists
+ file_exists
+ file_exists
+ file_exists
+ filesize
+ filesize
+ filesize
+ filesize
+ filesize
+ filesize
+ get
+ get
+ get
+ get
+ get
+ get
+ get
+ is_dir
+ is_dir
+ is_dir
+ is_dir
+ is_dir
+ is_dir
+ is_file
+ is_file
+ is_file
+ is_file
+ is_file
+ is_file
+ is_file
+ is_link
+ is_readable
+ is_readable
+ is_readable
+ is_writable
+ is_writable
+ is_writable
+ is_writeable
+ is_writeable
+ is_writeable
+ login
+ lstat
+ lstat
+ lstat
+ lstat
+ lstat
+ lstat
+ mkdir
+ mkdir
+ mkdir
+ mkdir
+ mkdir
+ mkdir
+ mkdir
+ mkdir
+ mkdir
+ nlist
+ nlist
+ nlist
+ nlist
+ nlist
+ nlist
+ put
+ put
+ put
+ put
+ put
+ put
+ put
+ put
+ put
+ pwd
+ pwd
+ pwd
+ pwd
+ pwd
+ rawlist
+ rawlist
+ readlink
+ rmdir
+ rmdir
+ setListOrder
+ setListOrder
+ setListOrder
+ stat
+ stat
+ stat
+ stat
+ stat
+ stat
+ stat
+ stat
+ stat
+ stat
+ stat
+ symlink
+ symlink
+ symlink
+ touch
+ touch
+ touch
+ touch
+ truncate
+ truncate
+ self::$exampleData
+ self::$exampleDataLength
+ self::$exampleDataLength
+ self::$scratchDir
+ $fp
+ $fp
+ SFTPUserStoryTest
+ SFTPUserStoryTest
+ SFTPUserStoryTest
+ SFTPWrongServerTest
+ SFTPWrongServerTest
+ SFTPWrongServerTest
+ $args
+ testAgentForward
+ $ssh->exec("ssh " . $username . "@" . $hostname . ' \'whoami\'')
+ $ssh->exec('whoami')
+ $args['ssh']
+ $args['ssh-agent']
+ $agent
+ $ssh
+ exec
+ exec
+ startSSHForwarding
+ SSH2AgentTest
+ SSH2AgentTest
+ SSH2AgentTest
+ 'stdClass'
+ setMethods
+ [$callbackObject, 'callbackMethod']
+ $ssh->getServerIdentification()
+ $matches[1]
+ $matches[1]
+ SSH2Test
+ SSH2Test
+ SSH2Test
+ $variable
+ $variable
+ _getEnv
+ string
+ $variable
+ $this->_getEnv($variable)
+ null
+ parent::assertRegExp($pattern, $string, $message)
+ $filename
+ $haystack
+ $haystack
+ string
+ $actual
+ $actual
+ $actual
+ $actual
+ $expected
+ $func
+ $obj
+ $obj
+ $params
+ $var
+ $tempFilesToUnlinkOnTearDown
+ callFunc
+ getVar
+ $expected
+ $expected
+ $filename
+ $filename
+ $func
+ $obj
+ $obj
+ $obj
+ $obj
+ $params
+ $value
+ $var
+ $this->tempFilesToUnlinkOnTearDown[$filename]
+ $this->tempFilesToUnlinkOnTearDown[]
+ $this->tempFilesToUnlinkOnTearDown[$filename]
+ $filename
+ $value
+ $filename
+ $filename
+ $filename
+ $fp
+ $fp
+ null
+ EvalTest
+ EvalTest
+ EvalTest
+ McryptTest
+ McryptTest
+ McryptTest
+ OpenSSLTest
+ OpenSSLTest
+ OpenSSLTest
+ PurePHPTest
+ PurePHPTest
+ PurePHPTest
+ 'LengthException'
+ $aes
+ $iv
+ $key
+ $mode
+ $mode
+ $mode
+ $op
+ $op
+ $plaintext
+ $test
+ $test
+ $engine
+ $c1
+ $c1
+ $iv
+ $key
+ $len
+ $len
+ $len
+ $len
+ $mode
+ $mode
+ $mode
+ $plaintext
+ $this->engine
+ $this->engine
+ $this->engine
+ $this->engine
+ $this->engine
+ $this->engine
+ $this->engine
+ $this->engine
+ $this->engine
+ $this->engine
+ $c1
+ $c1
+ $len
+ $len
+ $len
+ $len
+ $output
+ $output
+ getEngine
+ $output
+ $output
+ $this->engine
+ pack('H*', '00000000000000000000000000000000' . '00000000000000000000000000000000')
+ pack('H*', '00000000000000000000000000000000')
+ pack('H*', '00000000000000000000000000000000')
+ pack('H*', '00000000000000000000000000000000')
+ pack('H*', '00000000000000000000000000000000')
+ pack('H*', '000000000000000000000000000000000000000000000000')
+ pack('H*', '00d596e2c8189b2592fac358e7396ad2')
+ pack('H*', '014730f80ac625fe84f026c60bfd547d')
+ pack('H*', '0457bdb4a6712986688349a29eb82535')
+ pack('H*', '0457bdb4a6712986688349a29eb82535')
+ pack('H*', '0b24af36193ce4665f2825d7b4749c98')
+ pack('H*', '1b077a6af4b7f98229de786d7516b639')
+ pack('H*', '26aa49dcfe7629a8901a69a9914e6dfd')
+ pack('H*', '2b7e151628aed2a6abf7158809cf4f3c762e7160')
+ pack('H*', '2b7e151628aed2a6abf7158809cf4f3c762e7160')
+ pack('H*', '3243f6a8885a308d313198a2e0370734')
+ pack('H*', '3243f6a8885a308d313198a2e0370734')
+ pack('H*', '51719783d3185a535bd75adc65071ce1')
+ pack('H*', '58c8e00b2631686d54eab84b91f0aca1')
+ pack('H*', '6a118a874519e64e9963798a503f1d35')
+ pack('H*', '761c1fe41a18acf20d241650611d90f1')
+ pack('H*', '8a560769d605868ad80d819bdba03771')
+ pack('H*', '91fbef2d15a97816060bee1feaa49afe')
+ pack('H*', '941a4773058224e1ef66d10e0a6ee782')
+ pack('H*', '96ab5c2ff612d9dfaae8c31f30c42168')
+ pack('H*', '9798c4640bad75c7c3227db910174e72')
+ pack('H*', '9aa234ea7c750a8109a0f32d768b964e')
+ pack('H*', '9c2d8842e5f48f57648205d39a239af1')
+ pack('H*', 'b26aeb1874e47ca8358ff22378f09144')
+ pack('H*', 'bff52510095f518ecca60af4205444bb')
+ pack('H*', 'cb9fceec81286ca3e989bd979b0cb284')
+ pack('H*', 'f34481ec3cc627bacd5dc3fb08f273e6')
+ continuousBufferBatteryCombosWithoutSingleCombos
+ continuousBufferCombos
+ testContinuousBuffer
+ testContinuousBufferBattery
+ testECBDecrypt
+ testEncryptDecryptWithContinuousBuffer
+ testGFSBox128
+ testGFSBox192
+ testGFSBox256
+ testGetKeyLengthDefault
+ testGetKeyLengthWith192BitKey
+ testKeyPaddingAES
+ testKeyPaddingRijndael
+ testNoKey
+ testNonContinuousBufferBattery
+ testSetKeyLengthWithLargerKey
+ testSetKeyLengthWithSmallerKey
+ $engine
+ $expected
+ $key
+ $plaintext
+ $engine
+ $key
+ $plaintext
+ BlowfishTest
+ BlowfishTest
+ BlowfishTest
+ $actual
+ $result
+ $result
+ $aad
+ $key
+ $nonce
+ $nonce
+ $nonce
+ ChaCha20Test
+ ChaCha20Test
+ ChaCha20Test
+ $result
+ $ourPriv
+ $theirPub
+ $theirPublic
+ $alicePublic
+ $alicePublic
+ $alicePublic->toString('MontgomeryPublic')
+ $alicePublic->toString('MontgomeryPublic')
+ $bobPublic
+ $bobPublic
+ $bobPublic->toString('MontgomeryPublic')
+ $bobPublic->toString('MontgomeryPublic')
+ $key
+ $key
+ $secrets[$i]
+ $theirPub
+ $theirPublic
+ $alicePublic
+ $alicePublic
+ $bobPublic
+ $bobPublic
+ $key
+ $key
+ $ourEphemeralPublic
+ $secrets[$i]
+ $secrets[$i]
+ $theirPub
+ $theirPublic
+ toString
+ toString
+ toString
+ toString
+ toString
+ $ourEphemeralPublic->toString('MontgomeryPublic')
+ pack('H*', '5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb')
+ pack('H*', '77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a')
+ $secrets[0]
+ DHTest
+ DHTest
+ getPublicKey
+ getPublicKey
+ getPublicKey
+ getPublicKey
+ DHTest
+ 160
+ 512
+ $params
+ testCreateParameters
+ $params
+ CreateKeyTest
+ CreateKeyTest
+ CreateKeyTest
+ $dsa
+ $sig
+ toString
+ toString
+ toString
+ preg_replace('#\s#', '', $key)
+ preg_replace('#\s#', '', $pkcs8)
+ LoadDSAKeyTest
+ LoadDSAKeyTest
+ sign
+ verify
+ LoadDSAKeyTest
+ $dsa
+ $dsa
+ $dsa
+ $dsa
+ $dsa
+ $dsa
+ $dsa
+ $public
+ $public
+ $signature
+ $signature
+ $signature1
+ $signature2
+ getPublicKey
+ sign
+ sign
+ sign
+ sign
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ withHash
+ withHash
+ withSignatureFormat
+ withSignatureFormat
+ SignatureTest
+ SignatureTest
+ withSignatureFormat
+ withSignatureFormat
+ withSignatureFormat
+ withSignatureFormat
+ SignatureTest
+ $class
+ 'phpseclib3\Crypt\EC\Formats\Keys\PKCS8'
+ new $class()
+ new $class()
+ $name
+ $name
+ $name
+ $name
+ $name
+ $name
+ $name
+ $name
+ $name
+ $sig = $privateKey->sign("\x03")
+ $sig = $privateKey->sign("\x03")
+ $sig = $privateKey->sign("\x72")
+ $sig = $privateKey->sign("\xaf\x82")
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign($message)
+ $sig = $privateKey->sign('')
+ $sig = $privateKey->sign('')
+ $QA
+ $curve
+ $dA
+ $oid
+ $privateKey
+ $privatekey
+ $public
+ $publicKey
+ $publickey
+ $publickey
+ $publickey
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $sig
+ $signature
+ $signature1
+ $signature1
+ $signature2
+ $signature2
+ createRandomMultiplier
+ getBasePoint
+ getBasePoint
+ getPublicKey
+ multiplyPoint
+ sign
+ sign
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verifyPoint
+ verifyPoint
+ $name
+ $name
+ $private
+ $private
+ $private
+ $private
+ $private
+ $private
+ $private
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $private
+ $private
+ $private
+ $private
+ $private
+ $private
+ $private
+ $private
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ $public
+ CurveTest
+ CurveTest
+ getPublicKey
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ sign
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ verify
+ withContext
+ withContext
+ CurveTest
+ $oid
+ $components['dA']
+ $key
+ $password
+ load
+ $key
+ $password
+ load
+ $key->toString('XML')
+ 'RangeException'
+ $actual
+ $expected
+ $message
+ $actual
+ $expected
+ $message
+ $sig
+ $sig
+ $sig2
+ getCurve
+ getCurve
+ getCurve
+ sign
+ verify
+ $raw
+ KeyTest
+ KeyTest
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getCurve
+ getPublicKey
+ getPublicKey
+ getPublicKey
+ sign
+ sign
+ verify
+ verify
+ withSignatureFormat
+ withSignatureFormat
+ KeyTest
+ $private
+ $aad
+ $aad
+ $ciphertext
+ $ciphertext
+ $engine
+ $engine
+ $key
+ $key
+ $nonce
+ $nonce
+ $plaintext
+ $plaintext
+ $tag
+ $tag
+ $aad
+ $aad
+ $ciphertext
+ $ciphertext
+ $engine
+ $engine
+ $key
+ $key
+ $nonce
+ $nonce
+ $plaintext
+ $plaintext
+ $tag
+ $tag
+ GCMTest
+ GCMTest
+ GCMTest
+ $algo
+ $algorithm
+ $error
+ $expected
+ $expected
+ $hash
+ $hash
+ $hash
+ $hash
+ $hash
+ $hash
+ $key
+ $key
+ $key
+ $length
+ $message
+ $message
+ $message
+ $message
+ $message
+ $message
+ $message
+ $result
+ $result
+ $result
+ $result
+ $tag
+ $algo
+ $algorithm
+ $error
+ $expected
+ $expected
+ $hash
+ $hash
+ $hash
+ $hash
+ $key
+ $key
+ $message
+ $message
+ $message
+ $result
+ $result
+ $hash
+ $hash
+ $hash
+ HashTest
+ HashTest
+ HashTest
+ $ciphertext
+ $engine
+ $key
+ $keyLen
+ $plaintext
+ $engines
+ $engine
+ $keyLen
+ $engine
+ pack('H*', $ciphertext)
+ pack('H*', $key)
+ pack('H*', $plaintext)
+ RC2Test
+ RC2Test
+ RC2Test
+ $engine
+ $expected
+ $key
+ $offset
+ $engine
+ $key
+ $offset + 16
+ $offset
+ RC4Test
+ RC4Test
+ new RC4(RC4::MODE_CTR)
+ new RC4(RC4::MODE_CTR)
+ new RC4(RC4::MODE_CTR)
+ RC4Test
+ $args
+ $key
+ $r['primes']
+ $r['primes']
+ $rsa->getPublicKey()->toString('PKCS1')
+ $privatekey
+ $publickey
+ $actual
+ $ciphertext
+ $key
+ $plaintext
+ $prime
+ $signature
+ list($publickey, $privatekey)
+ decrypt
+ encrypt
+ getLength
+ toString
+ toString
+ $r['primes']
+ $r['primes']
+ PKCS8::extractEncryptionAlgorithm($key)['algorithm']
+ CreateKeyTest
+ CreateKeyTest
+ getPublicKey
+ getPublicKey
+ getPublicKey
+ sign
+ verify
+ withPassword
+ CreateKeyTest
+ $i
+ false
+ $key
+ $key
+ $pass
+ $encryptedKey
+ $key
+ $key
+ $pass
+ $pass
+ $pass
+ $pass
+ $r['meta']['algorithm']
+ $r['meta']['cipher']
+ $r['meta']['prf']
+ $rsa->sign('zzzz')
+ $key['d']
+ $key['e']
+ $key['n']
+ $key['primes']
+ $key['primes']
+ $r2['meta']['algorithm']
+ $r2['meta']['cipher']
+ $r2['meta']['prf']
+ $r['meta']['algorithm']
+ $r['meta']['algorithm']
+ $r['meta']['cipher']
+ $r['meta']['prf']
+ $encryptedKey
+ $key
+ $key2
+ $rsa
+ $rsa
+ $rsa2
+ $sig
+ sign
+ toString
+ toString
+ toString
+ withPadding
+ $key
+ $raw
+ hex2bin($key)
+ $ciphertext
+ $raw['comment']
+ $key
+ $key
+ $orig
+ preg_replace('#\s#', '', $key)
+ preg_replace('#\s#', '', $newkey)
+ $r2['MGFHash']
+ $r2['hash']
+ $r2['meta']
+ $r2['meta']
+ $r2['meta']
+ $r2['saltLength']
+ $r['MGFHash']
+ $r['hash']
+ $r['meta']
+ $r['meta']['algorithm']
+ $r['meta']['prf']
+ $r['saltLength']
+ $raw['comment']
+ LoadKeyTest
+ LoadKeyTest
+ RSA::load($key, false, 'PKCS8')
+ asPrivateKey
+ sign
+ verify
+ withMGFHash
+ withPassword
+ withPassword
+ withPassword
+ LoadKeyTest
+ 'LengthException'
+ $rsa->decrypt($result)
+ $ciphertext
+ $result
+ $rsa
+ $rsa
+ $rsa
+ $rsa
+ $rsa
+ $rsa
+ $rsa
+ $rsa
+ $rsa
+ $rsa
+ decrypt
+ decrypt
+ encrypt
+ encrypt
+ getHash
+ getHash
+ getMGFHash
+ getMGFHash
+ getPublicKey
+ getSaltLength
+ getSaltLength
+ sign
+ verify
+ verify
+ verify
+ verify
+ verify
+ withHash
+ withHash
+ withMGFHash
+ withMGFHash
+ withMGFHash
+ withMGFHash
+ withPadding
+ withSaltLength
+ base64_decode('158753FF2AF4D1E5BBAB574D5AE6B54D')
+ base64_decode('272435F22706FA96DE26E980D22DFF67')
+ ModeTest
+ ModeTest
+ decrypt
+ encrypt
+ getPublicKey
+ withLabel
+ withLabel
+ withMGFHash
+ withPadding
+ withPadding
+ withPadding
+ withSaltLength
+ withSaltLength
+ withSaltLength
+ ModeTest
+ $length
+ $x
+ $length
+ RandomTest
+ RandomTest
+ RandomTest
+ $engine
+ $expected
+ $iv
+ $key
+ $engine
+ $key
+ pack('H*', $iv)
+ pack('H*', $key)
+ Salsa20Test
+ Salsa20Test
+ Salsa20Test
+ $engine
+ $engine
+ $expected
+ $expected
+ $iv
+ $key
+ $key
+ $plaintext
+ $plaintext
+ $engines
+ $engine
+ $engine
+ $engine
+ $iv
+ $key
+ $key
+ $plaintext
+ $plaintext
+ $engine
+ $engine
+ base64_decode($key)
+ TripleDESTest
+ TripleDESTest
+ TripleDESTest
+ $key
+ $key
+ $key
+ $plaintext
+ $plaintext
+ $plaintext
+ $plaintext
+ $plaintext
+ $plaintext
+ TwofishTest
+ TwofishTest
+ TwofishTest
+ $lines[22]
+ ANSITest
+ ANSITest
+ ANSITest
+ $a[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content'][1]['content'][0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $decoded[0]['content']
+ $a
+ $data
+ $em
+ $em
+ $em
+ $em
+ $em
+ $em
+ $em
+ $em
+ $em
+ $orig
+ base64_decode($str)
+ base64_decode($str)
+ base64_decode($str)
+ base64_decode('MBaAFJtUo7c00HsI5EPZ4bkICfkOY2Pv')
+ file_get_contents(dirname(__FILE__) . '/ASN1/FE.pdf.p7m')
+ base64_decode('MD6gJQYKKwYBBAGCNxQCA6AXDBVvZmZpY2VAY2VydGRpZ2l0YWwucm+BFW9mZmljZUBjZXJ0ZGlnaXRhbC5ybw==')
+ $a[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ $decoded[0]
+ ASN1Test
+ ASN1Test
+ ASN1Test
+ $test
+ CRLTest
+ CRLTest
+ CRLTest
+ $rsa
+ $x509->signCSR()
+ $x509->signCSR()
+ $csr
+ $csr
+ $rsa
+ $spkac
+ getPadding
+ getPadding
+ getPadding
+ getPadding
+ withHash
+ $x509->getPublicKey()->getPadding()
+ $x509->getPublicKey()->getPadding()
+ $x509->getPublicKey()->getPadding()
+ $x509->getPublicKey()->getPadding()
+ $csr
+ CSRTest
+ CSRTest
+ withPadding
+ CSRTest
+ $privatekey
+ $privatekey
+ $spkac
+ $spkac
+ $spkac
+ $spkac['publicKeyAndChallenge']
+ $spkac['publicKeyAndChallenge']
+ $pubKey
+ $spkac
+ $spkac
+ $spkac
+ $spkac
+ $spkac
+ SPKACTest
+ SPKACTest
+ SPKACTest
+ 'phpseclib3\Math\BigInteger'
+ $privateKey
+ $authority->sign($issuer, $subject)
+ $publicKey
+ $result
+ $subjectKey
+ $customExtensionDecodedData['list']
+ $customExtensionDecodedData['name']
+ $customExtensionDecodedData['num']
+ $customExtensionDecodedData['num']
+ $customExtensionDecodedData['toggle']
+ $decodedData['tbsCertificate']
+ $extension['extnId']
+ $extension['extnValue']
+ $loader->loadX509($cert)['tbsCertificate']
+ $customExtensionDecodedData
+ $decodedData
+ $extension
+ $publicKey
+ $result
+ $subjectKey
+ $customExtensionDecodedData['list']
+ $customExtensionDecodedData['name']
+ $customExtensionDecodedData['num']
+ $customExtensionDecodedData['num']
+ $customExtensionDecodedData['toggle']
+ X509ExtensionTest
+ X509ExtensionTest
+ getPublicKey
+ X509ExtensionTest
+ $private
+ $private
+ $private
+ $private
+ $privatekey
+ $cakey
+ $cert
+ $cert['signatureAlgorithm']
+ $cert['tbsCertificate']['signature']
+ $cert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']
+ $crt
+ $decoded
+ $newcert->sign($ca, $oldcert)
+ $privKey
+ $private
+ $private->getPublicKey()
+ $pubKey
+ $public
+ $public
+ $public
+ $public
+ $publickey
+ $r
+ $r['signatureAlgorithm']
+ $r['tbsCertificate']['signature']
+ $r['tbsCertificate']['subjectPublicKeyInfo']['algorithm']
+ $result
+ $result
+ $result
+ $result
+ $result
+ $result['tbsCertificate']['extensions']
+ $cert['signatureAlgorithm']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $cert['tbsCertificate']
+ $r['signatureAlgorithm']
+ $r['signatureAlgorithm']
+ $r['signatureAlgorithm']
+ $r['signatureAlgorithm']
+ $r['signatureAlgorithm']
+ $r['signatureAlgorithm']
+ $r['signatureAlgorithm']
+ $r['signatureAlgorithm']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $r['tbsCertificate']
+ $result['tbsCertificate']
+ $cert['tbsCertificate']
+ $authorityKeyIdentifier
+ $authorityKeyIdentifier
+ $cakey
+ $cert
+ $cert
+ $cert
+ $cert
+ $cert
+ $cert
+ $cert
+ $crt
+ $decoded
+ $privKey
+ $private
+ $pubKey
+ $public
+ $public
+ $public
+ $public
+ $publickey
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $r
+ $result
+ $result
+ $result
+ $result
+ $result
+ $result
+ getPublicKey
+ getPublicKey
+ withHash
+ withHash
+ withHash
+ $a
+ X509Test
+ X509Test
+ getPublicKey
+ getPublicKey
+ getPublicKey
+ getPublicKey
+ getPublicKey
+ withPadding
+ withPadding
+ withPadding
+ X509Test
+ $cert
+ 'DefaultEngine'
+ $base
+ $x
+ $base
+ BCMathTest
+ BCMathTest
+ 'DefaultEngine'
+ BCMathTest
+ $base
+ $x
+ $base
+ $x
+ DefaultTest
+ DefaultTest
+ DefaultTest
+ 'DefaultEngine'
+ $base
+ $x
+ $base
+ GMPTest
+ GMPTest
+ 'DefaultEngine'
+ GMPTest
+ 'DefaultEngine'
+ $base
+ $x
+ $base
+ PHP32Test
+ PHP32Test
+ 'DefaultEngine'
+ PHP32Test
+ 'OpenSSL'
+ $base
+ $x
+ $base
+ PHP64OpenSSLTest
+ PHP64OpenSSLTest
+ 'OpenSSL'
+ PHP64OpenSSLTest
+ 'DefaultEngine'
+ $base
+ $x
+ $base
+ PHP64Test
+ PHP64Test
+ 'DefaultEngine'
+ PHP64Test
+ $r
+ $arr['gcd']
+ $arr['x']
+ $arr['y']
+ $q
+ $q
+ $q
+ $q
+ $r
+ $r
+ $r
+ $r
+ $a
+ $a
+ $a
+ $a
+ $a
+ $a
+ $a
+ $a
+ $a
+ $a
+ $a
+ $alicePrivate
+ $alicePublic
+ $aliceShared
+ $arr
+ $b
+ $b
+ $b
+ $b
+ $b
+ $b
+ $b
+ $b
+ $b
+ $b
+ $bigInteger
+ $bigInteger
+ $bigInteger
+ $bigInteger
+ $bigInteger
+ $bigInteger
+ $bobPrivate
+ $bobPublic
+ $bobShared
+ $c
+ $c
+ $c
+ $c
+ $c
+ $c
+ $class
+ $class
+ $class
+ $class
+ $d
+ $d
+ $d
+ $e
+ $generator
+ $max
+ $max
+ $max
+ $min
+ $min
+ $min
+ $n
+ $n
+ $num
+ $prime
+ $prime
+ $r
+ $rand1
+ $temp
+ $temp
+ $temp
+ $three
+ $two
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x
+ $x2
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $y
+ $z
+ $z
+ $z
+ $z
+ $z
+ $z
+ list($q, $r)
+ list($q, $r)
+ list($q, $r)
+ list($q, $r)
+ clone $a
+ clone $x
+ $class::max($max, $min)
+ $class::max($min, $max)
+ $class::min($max, $min)
+ $class::min($min, $max)
+ $class::randomPrime(128)
+ $class::randomRange($min, $max)
+ abs
+ add
+ add
+ bitwise_AND
+ bitwise_LeftShift
+ bitwise_NOT
+ bitwise_OR
+ bitwise_OR
+ bitwise_OR
+ bitwise_RightShift
+ bitwise_RightShift
+ bitwise_RightShift
+ bitwise_XOR
+ bitwise_not
+ bitwise_xor
+ bitwise_xor
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ compare
+ divide
+ divide
+ divide
+ divide
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ equals
+ extendedGCD
+ gcd
+ getLength
+ getPrecision
+ getPrecision
+ getPrecision
+ getPrecision
+ modInverse
+ modPow
+ modPow
+ modPow
+ modPow
+ modPow
+ multiply
+ multiply
+ multiply
+ pow
+ pow
+ powMod
+ root
+ root
+ setPrecision
+ setPrecision
+ subtract
+ toBits
+ toBits
+ toBits
+ toBytes
+ toBytes
+ toBytes
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toHex
+ toString
+ toString
+ toString
+ toString
+ toString
+ toString
+ toString
+ toString
+ toString
+ toString
+ toString
+ toString
+ $a->toString()
+ $b->toString()
+ test48ToHex
+ testAbs
+ testAdd
+ testBitwiseAND
+ testBitwiseLeftShift
+ testBitwiseNOT
+ testBitwiseOR
+ testBitwiseRightShift
+ testBitwiseXOR
+ testClone
+ testCompare
+ testConstructorBase10
+ testConstructorBase16
+ testConstructorBase2
+ testConstructorBase256
+ testDebugInfo
+ testDiffieHellmanKeyAgreement
+ testDivide
+ testEquals
+ testExtendedGCD
+ testGCD
+ testMax
+ testMin
+ testModInverse
+ testModPow
+ testMultiply
+ testNegativePrecision
+ testPow
+ testPrecision
+ testRandomPrime
+ testRandomTwoArgument
+ testRoot
+ testSerializable
+ testSlidingWindow
+ testSubtract
+ testToBits
+ testToBytes
+ testToBytesTwosCompliment
+ testToHex
+ testZeroBase10
+ testZeros
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ getInstance
+ static::getStaticClass()
+ static::getStaticClass()
+ static::getStaticClass()
+ static::getStaticClass()
+ $q
+ $engine[0]
+ $engine[1]
+ $engine[0]
+ $engine[0]
+ $engine[1]
+ BigIntegerTest
+ BigIntegerTest
+ BigIntegerTest
+ SFTPStreamUnitTest
+ SFTPStreamUnitTest
+ SFTPStreamUnitTest
+ 'phpseclib3\Net\SSH2'
+ setMethods
+ \phpseclib3\Net\SSH2
+ $expected
+ $identifier
+ $identifier
+ $result
+ SSH2UnitTest
+ SSH2UnitTest
+ SSH2UnitTest
+ ' . Base64::encode($p->toBytes()) . "
\r\n" . diff --git a/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php b/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php index df52beed..99a50c0f 100644 --- a/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php +++ b/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php @@ -14,6 +14,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\DSA\Formats\Signature; use phpseclib3\File\ASN1 as Encoder; @@ -30,10 +32,9 @@ abstract class ASN1 /** * Loads a signature * - * @param string $sig * @return array|bool */ - public static function load($sig) + public static function load(string $sig) { if (!is_string($sig)) { return false; @@ -50,12 +51,8 @@ abstract class ASN1 /** * Returns a signature in the appropriate format - * - * @param \phpseclib3\Math\BigInteger $r - * @param \phpseclib3\Math\BigInteger $s - * @return string */ - public static function save(BigInteger $r, BigInteger $s) + public static function save(BigInteger $r, BigInteger $s): string { return Encoder::encodeDER(compact('r', 's'), Maps\DssSigValue::MAP); } diff --git a/phpseclib/Crypt/DSA/Formats/Signature/Raw.php b/phpseclib/Crypt/DSA/Formats/Signature/Raw.php index 2657a2a8..205ba710 100644 --- a/phpseclib/Crypt/DSA/Formats/Signature/Raw.php +++ b/phpseclib/Crypt/DSA/Formats/Signature/Raw.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\DSA\Formats\Signature; use phpseclib3\Crypt\Common\Formats\Signature\Raw as Progenitor; diff --git a/phpseclib/Crypt/DSA/Formats/Signature/SSH2.php b/phpseclib/Crypt/DSA/Formats/Signature/SSH2.php index dbfceabb..6dba270a 100644 --- a/phpseclib/Crypt/DSA/Formats/Signature/SSH2.php +++ b/phpseclib/Crypt/DSA/Formats/Signature/SSH2.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\DSA\Formats\Signature; use phpseclib3\Common\Functions\Strings; @@ -27,11 +29,8 @@ abstract class SSH2 { /** * Loads a signature - * - * @param string $sig - * @return mixed */ - public static function load($sig) + public static function load(string $sig) { if (!is_string($sig)) { return false; @@ -41,7 +40,7 @@ abstract class SSH2 if ($result === false) { return false; } - list($type, $blob) = $result; + [$type, $blob] = $result; if ($type != 'ssh-dss' || strlen($blob) != 40) { return false; } @@ -55,8 +54,6 @@ abstract class SSH2 /** * Returns a signature in the appropriate format * - * @param \phpseclib3\Math\BigInteger $r - * @param \phpseclib3\Math\BigInteger $s * @return string */ public static function save(BigInteger $r, BigInteger $s) diff --git a/phpseclib/Crypt/DSA/Parameters.php b/phpseclib/Crypt/DSA/Parameters.php index 6bcb152d..5dc8a718 100644 --- a/phpseclib/Crypt/DSA/Parameters.php +++ b/phpseclib/Crypt/DSA/Parameters.php @@ -9,6 +9,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\DSA; use phpseclib3\Crypt\DSA; @@ -23,11 +25,9 @@ class Parameters extends DSA /** * Returns the parameters * - * @param string $type * @param array $options optional - * @return string */ - public function toString($type = 'PKCS1', array $options = []) + public function toString(string $type = 'PKCS1', array $options = []): string { $type = self::validatePlugin('Keys', 'PKCS1', 'saveParameters'); diff --git a/phpseclib/Crypt/DSA/PrivateKey.php b/phpseclib/Crypt/DSA/PrivateKey.php index 7039941b..82fd3846 100644 --- a/phpseclib/Crypt/DSA/PrivateKey.php +++ b/phpseclib/Crypt/DSA/PrivateKey.php @@ -9,6 +9,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\DSA; use phpseclib3\Crypt\Common; @@ -51,7 +53,6 @@ class PrivateKey extends DSA implements Common\PrivateKey * without the parameters and the PKCS1 DSA public key format does not include the parameters. * * @see self::getPrivateKey() - * @return mixed */ public function getPublicKey() { @@ -73,9 +74,8 @@ class PrivateKey extends DSA implements Common\PrivateKey * * @see self::verify() * @param string $message - * @return mixed */ - public function sign($message) + public function sign($message): string { $format = $this->sigFormat; @@ -100,14 +100,14 @@ class PrivateKey extends DSA implements Common\PrivateKey while (true) { $k = BigInteger::randomRange(self::$one, $this->q->subtract(self::$one)); $r = $this->g->powMod($k, $this->p); - list(, $r) = $r->divide($this->q); + [, $r] = $r->divide($this->q); if ($r->equals(self::$zero)) { continue; } $kinv = $k->modInverse($this->q); $temp = $h->add($this->x->multiply($r)); $temp = $kinv->multiply($temp); - list(, $s) = $temp->divide($this->q); + [, $s] = $temp->divide($this->q); if (!$s->equals(self::$zero)) { break; } @@ -135,11 +135,9 @@ class PrivateKey extends DSA implements Common\PrivateKey /** * Returns the private key * - * @param string $type * @param array $options optional - * @return string */ - public function toString($type, array $options = []) + public function toString(string $type, array $options = []): string { $type = self::validatePlugin('Keys', $type, 'savePrivateKey'); diff --git a/phpseclib/Crypt/DSA/PublicKey.php b/phpseclib/Crypt/DSA/PublicKey.php index 7e00e24a..5a0af509 100644 --- a/phpseclib/Crypt/DSA/PublicKey.php +++ b/phpseclib/Crypt/DSA/PublicKey.php @@ -9,6 +9,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\DSA; use phpseclib3\Crypt\Common; @@ -30,9 +32,8 @@ class PublicKey extends DSA implements Common\PublicKey * @see self::verify() * @param string $message * @param string $signature - * @return mixed */ - public function verify($message, $signature) + public function verify($message, $signature): bool { $format = $this->sigFormat; @@ -60,12 +61,12 @@ class PublicKey extends DSA implements Common\PublicKey $w = $s->modInverse($this->q); $h = $this->hash->hash($message); $h = $this->bits2int($h); - list(, $u1) = $h->multiply($w)->divide($this->q); - list(, $u2) = $r->multiply($w)->divide($this->q); + [, $u1] = $h->multiply($w)->divide($this->q); + [, $u2] = $r->multiply($w)->divide($this->q); $v1 = $this->g->powMod($u1, $this->p); $v2 = $this->y->powMod($u2, $this->p); - list(, $v) = $v1->multiply($v2)->divide($this->p); - list(, $v) = $v->divide($this->q); + [, $v] = $v1->multiply($v2)->divide($this->p); + [, $v] = $v->divide($this->q); return $v->equals($r); } @@ -73,11 +74,9 @@ class PublicKey extends DSA implements Common\PublicKey /** * Returns the public key * - * @param string $type * @param array $options optional - * @return string */ - public function toString($type, array $options = []) + public function toString(string $type, array $options = []): string { $type = self::validatePlugin('Keys', $type, 'savePublicKey'); diff --git a/phpseclib/Crypt/EC.php b/phpseclib/Crypt/EC.php index 703a7bc0..f80b2e82 100644 --- a/phpseclib/Crypt/EC.php +++ b/phpseclib/Crypt/EC.php @@ -27,6 +27,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt; use phpseclib3\Crypt\Common\AsymmetricKey; @@ -125,11 +127,8 @@ abstract class EC extends AsymmetricKey /** * Create public / private key pair. - * - * @param string $curve - * @return \phpseclib3\Crypt\EC\PrivateKey */ - public static function createKey($curve) + public static function createKey(string $curve): PrivateKey { self::initialize_static_variables(); @@ -198,10 +197,9 @@ abstract class EC extends AsymmetricKey /** * OnLoad Handler * - * @return bool - * @param array $components + *@return bool */ - protected static function onLoad($components) + protected static function onLoad(array $components) { if (!isset(self::$engines['PHP'])) { self::useBestEngine(); @@ -294,10 +292,8 @@ abstract class EC extends AsymmetricKey * representation of the field, commonly denoted by m. A set of * elliptic curve domain parameters defines a group of order n generated * by a base point P" - * - * @return int */ - public function getLength() + public function getLength(): int { return $this->curve->getLength(); } @@ -307,9 +303,8 @@ abstract class EC extends AsymmetricKey * * @see self::useInternalEngine() * @see self::useBestEngine() - * @return string */ - public function getEngine() + public function getEngine(): string { if (!isset(self::$engines['PHP'])) { self::useBestEngine(); @@ -327,10 +322,8 @@ abstract class EC extends AsymmetricKey * Returns the public key coordinates as a string * * Used by ECDH - * - * @return string */ - public function getEncodedCoordinates() + public function getEncodedCoordinates(): string { if ($this->curve instanceof MontgomeryCurve) { return strrev($this->QA[0]->toBytes(true)); @@ -344,11 +337,10 @@ abstract class EC extends AsymmetricKey /** * Returns the parameters * - * @see self::getPublicKey() * @param string $type optional - * @return mixed + *@see self::getPublicKey() */ - public function getParameters($type = 'PKCS1') + public function getParameters(string $type = 'PKCS1') { $type = self::validatePlugin('Keys', $type, 'saveParameters'); @@ -363,10 +355,8 @@ abstract class EC extends AsymmetricKey * Determines the signature padding mode * * Valid values are: ASN1, SSH2, Raw - * - * @param string $format */ - public function withSignatureFormat($format) + public function withSignatureFormat(string $format): EC { if ($this->curve instanceof MontgomeryCurve) { throw new UnsupportedOperationException('Montgomery Curves cannot be used to create signatures'); @@ -380,9 +370,8 @@ abstract class EC extends AsymmetricKey /** * Returns the signature format currently being used - * */ - public function getSignatureFormat() + public function getSignatureFormat(): string { return $this->shortFormat; } @@ -392,11 +381,11 @@ abstract class EC extends AsymmetricKey * * Used by Ed25519 / Ed448. * - * @see self::sign() - * @see self::verify() - * @param string $context optional + * @param string|null $context optional + *@see self::verify() + * @see self::sign() */ - public function withContext($context = null) + public function withContext(string $context = null): EC { if (!$this->curve instanceof TwistedEdwardsCurve) { throw new UnsupportedCurveException('Only Ed25519 and Ed448 support contexts'); @@ -419,19 +408,16 @@ abstract class EC extends AsymmetricKey /** * Returns the signature format currently being used - * */ - public function getContext() + public function getContext(): string { return $this->context; } /** * Determines which hashing function should be used - * - * @param string $hash */ - public function withHash($hash) + public function withHash(string $hash): AsymmetricKey { if ($this->curve instanceof MontgomeryCurve) { throw new UnsupportedOperationException('Montgomery Curves cannot be used to create signatures'); diff --git a/phpseclib/Crypt/EC/BaseCurves/Base.php b/phpseclib/Crypt/EC/BaseCurves/Base.php index 60729d74..8aebf78b 100644 --- a/phpseclib/Crypt/EC/BaseCurves/Base.php +++ b/phpseclib/Crypt/EC/BaseCurves/Base.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\BaseCurves; use phpseclib3\Math\BigInteger; @@ -75,7 +77,7 @@ abstract class Base * * @return integer */ - public function getLengthInBytes() + public function getLengthInBytes(): int { return $this->factory->getLengthInBytes(); } @@ -85,7 +87,7 @@ abstract class Base * * @return integer */ - public function getLength() + public function getLength(): int { return $this->factory->getLength(); } @@ -97,10 +99,8 @@ abstract class Base * * https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Montgomery_ladder * https://github.com/phpecc/phpecc/issues/16#issuecomment-59176772 - * - * @return array */ - public function multiplyPoint(array $p, BigInteger $d) + public function multiplyPoint(array $p, BigInteger $d): array { $alreadyInternal = isset($p[2]); $r = $alreadyInternal ? @@ -119,10 +119,8 @@ abstract class Base /** * Creates a random scalar multiplier - * - * @return BigInteger */ - public function createRandomMultiplier() + public function createRandomMultiplier(): BigInteger { static $one; if (!isset($one)) { @@ -135,7 +133,7 @@ abstract class Base /** * Performs range check */ - public function rangeCheck(BigInteger $x) + public function rangeCheck(BigInteger $x): void { static $zero; if (!isset($zero)) { @@ -153,17 +151,15 @@ abstract class Base /** * Sets the Order */ - public function setOrder(BigInteger $order) + public function setOrder(BigInteger $order): void { $this->order = $order; } /** * Returns the Order - * - * @return \phpseclib3\Math\BigInteger */ - public function getOrder() + public function getOrder(): BigInteger { return $this->order; } @@ -183,7 +179,7 @@ abstract class Base * * @return object[] */ - public function convertToAffine(array $p) + public function convertToAffine(array $p): array { return $p; } @@ -193,7 +189,7 @@ abstract class Base * * @return object[] */ - public function convertToInternal(array $p) + public function convertToInternal(array $p): array { return $p; } @@ -203,7 +199,7 @@ abstract class Base * * @return object[] */ - public function negatePoint(array $p) + public function negatePoint(array $p): array { $temp = [ $p[0], @@ -220,7 +216,7 @@ abstract class Base * * @return int[] */ - public function multiplyAddPoints(array $points, array $scalars) + public function multiplyAddPoints(array $points, array $scalars): array { $p1 = $this->convertToInternal($points[0]); $p2 = $this->convertToInternal($points[1]); diff --git a/phpseclib/Crypt/EC/BaseCurves/Binary.php b/phpseclib/Crypt/EC/BaseCurves/Binary.php index 4fc6c70c..960f99af 100644 --- a/phpseclib/Crypt/EC/BaseCurves/Binary.php +++ b/phpseclib/Crypt/EC/BaseCurves/Binary.php @@ -19,6 +19,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\BaseCurves; use phpseclib3\Math\BigInteger; @@ -70,7 +72,7 @@ class Binary extends Base /** * The modulo * - * @var BigInteger + * @var array */ protected $modulo; @@ -84,7 +86,7 @@ class Binary extends Base /** * Sets the modulo */ - public function setModulo(...$modulo) + public function setModulo(...$modulo): void { $this->modulo = $modulo; $this->factory = new BinaryField(...$modulo); @@ -94,11 +96,8 @@ class Binary extends Base /** * Set coefficients a and b - * - * @param string $a - * @param string $b */ - public function setCoefficients($a, $b) + public function setCoefficients(string $a, string $b): void { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -113,7 +112,7 @@ class Binary extends Base * @param string|BinaryInteger $x * @param string|BinaryInteger $y */ - public function setBasePoint($x, $y) + public function setBasePoint($x, $y): void { switch (true) { case !is_string($x) && !$x instanceof BinaryInteger: @@ -153,7 +152,7 @@ class Binary extends Base * * @return FiniteField[] */ - public function addPoint(array $p, array $q) + public function addPoint(array $p, array $q): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -179,8 +178,8 @@ class Binary extends Base // formulas from http://hyperelliptic.org/EFD/g12o/auto-shortw-jacobian.html - list($x1, $y1, $z1) = $p; - list($x2, $y2, $z2) = $q; + [$x1, $y1, $z1] = $p; + [$x2, $y2, $z2] = $q; $o1 = $z1->multiply($z1); $b = $x2->multiply($o1); @@ -226,7 +225,7 @@ class Binary extends Base * * @return FiniteField[] */ - public function doublePoint(array $p) + public function doublePoint(array $p): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -242,7 +241,7 @@ class Binary extends Base // formulas from http://hyperelliptic.org/EFD/g12o/auto-shortw-jacobian.html - list($x1, $y1, $z1) = $p; + [$x1, $y1, $z1] = $p; $a = $x1->multiply($x1); $b = $a->multiply($a); @@ -277,10 +276,8 @@ class Binary extends Base * "Due to patent issues the compressed option is disabled by default for binary curves * and can be enabled by defining the preprocessor macro OPENSSL_EC_BIN_PT_COMP at * compile time." - * - * @return array */ - public function derivePoint($m) + public function derivePoint($m): array { throw new \RuntimeException('Point compression on binary finite field elliptic curves is not supported'); } @@ -290,9 +287,9 @@ class Binary extends Base * * @return boolean */ - public function verifyPoint(array $p) + public function verifyPoint(array $p): bool { - list($x, $y) = $p; + [$x, $y] = $p; $lhs = $y->multiply($y); $lhs = $lhs->add($x->multiply($y)); $x2 = $x->multiply($x); @@ -304,10 +301,8 @@ class Binary extends Base /** * Returns the modulo - * - * @return \phpseclib3\Math\BigInteger */ - public function getModulo() + public function getModulo(): array { return $this->modulo; } @@ -341,12 +336,12 @@ class Binary extends Base * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToAffine(array $p) + public function convertToAffine(array $p): array { if (!isset($p[2])) { return $p; } - list($x, $y, $z) = $p; + [$x, $y, $z] = $p; $z = $this->one->divide($z); $z2 = $z->multiply($z); return [ @@ -360,7 +355,7 @@ class Binary extends Base * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToInternal(array $p) + public function convertToInternal(array $p): array { if (isset($p[2])) { return $p; diff --git a/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php b/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php index dba83be4..9d0a6d71 100644 --- a/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php +++ b/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php @@ -26,6 +26,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\BaseCurves; use phpseclib3\Math\BigInteger; @@ -52,7 +54,7 @@ class KoblitzPrime extends Prime * * @return int[] */ - public function multiplyAddPoints(array $points, array $scalars) + public function multiplyAddPoints(array $points, array $scalars): array { static $zero, $one, $two; if (!isset($two)) { @@ -106,16 +108,16 @@ class KoblitzPrime extends Prime $k = $scalars[$i]->toBigInteger(); // begin split - list($v1, $v2) = $this->basis; + [$v1, $v2] = $this->basis; $c1 = $v2['b']->multiply($k); - list($c1, $r) = $c1->divide($this->order); + [$c1, $r] = $c1->divide($this->order); if ($this->order->compare($r->multiply($two)) <= 0) { $c1 = $c1->add($one); } $c2 = $v1['b']->negate()->multiply($k); - list($c2, $r) = $c2->divide($this->order); + [$c2, $r] = $c2->divide($this->order); if ($this->order->compare($r->multiply($two)) <= 0) { $c2 = $c2->add($one); } @@ -173,7 +175,7 @@ class KoblitzPrime extends Prime * * @return FiniteField[] */ - protected function doublePointHelper(array $p) + protected function doublePointHelper(array $p): array { $numerator = $this->three->multiply($p[0])->multiply($p[0]); $denominator = $this->two->multiply($p[1]); @@ -187,9 +189,9 @@ class KoblitzPrime extends Prime * * @return FiniteField[] */ - protected function jacobianDoublePoint(array $p) + protected function jacobianDoublePoint(array $p): array { - list($x1, $y1, $z1) = $p; + [$x1, $y1, $z1] = $p; $a = $x1->multiply($x1); $b = $y1->multiply($y1); $c = $b->multiply($b); @@ -212,9 +214,9 @@ class KoblitzPrime extends Prime * * @return FiniteField[] */ - protected function jacobianDoublePointMixed(array $p) + protected function jacobianDoublePointMixed(array $p): array { - list($x1, $y1) = $p; + [$x1, $y1] = $p; $xx = $x1->multiply($x1); $yy = $y1->multiply($y1); $yyyy = $yy->multiply($yy); @@ -234,9 +236,9 @@ class KoblitzPrime extends Prime * * @return boolean */ - public function verifyPoint(array $p) + public function verifyPoint(array $p): bool { - list($x, $y) = $p; + [$x, $y] = $p; $lhs = $y->multiply($y); $temp = $x->multiply($x)->multiply($x); $rhs = $temp->add($this->b); @@ -248,11 +250,9 @@ class KoblitzPrime extends Prime * Calculates the parameters needed from the Euclidean algorithm as discussed at * http://diamond.boisestate.edu/~liljanab/MATH308/GuideToECC.pdf#page=148 * - * @param BigInteger $u - * @param BigInteger $v * @return BigInteger[] */ - protected static function extendedGCD(BigInteger $u, BigInteger $v) + protected static function extendedGCD(BigInteger $u, BigInteger $v): array { $one = new BigInteger(1); $zero = new BigInteger(); @@ -272,7 +272,7 @@ class KoblitzPrime extends Prime $postGreatestIndex = 0; while (!$v->equals($zero)) { - list($q) = $u->divide($v); + [$q] = $u->divide($v); $temp = $u; $u = $v; diff --git a/phpseclib/Crypt/EC/BaseCurves/Montgomery.php b/phpseclib/Crypt/EC/BaseCurves/Montgomery.php index e3fa50b3..66c98817 100644 --- a/phpseclib/Crypt/EC/BaseCurves/Montgomery.php +++ b/phpseclib/Crypt/EC/BaseCurves/Montgomery.php @@ -22,6 +22,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\BaseCurves; use phpseclib3\Crypt\EC\Curves\Curve25519; @@ -95,7 +97,7 @@ class Montgomery extends Base /** * Sets the modulo */ - public function setModulo(BigInteger $modulo) + public function setModulo(BigInteger $modulo): void { $this->modulo = $modulo; $this->factory = new PrimeField($modulo); @@ -106,7 +108,7 @@ class Montgomery extends Base /** * Set coefficients a */ - public function setCoefficients(BigInteger $a) + public function setCoefficients(BigInteger $a): void { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -124,7 +126,7 @@ class Montgomery extends Base * @param BigInteger|PrimeInteger $y * @return PrimeInteger[] */ - public function setBasePoint($x, $y) + public function setBasePoint($x, $y): array { switch (true) { case !$x instanceof BigInteger && !$x instanceof PrimeInteger: @@ -166,7 +168,7 @@ class Montgomery extends Base * * @return FiniteField[][] */ - private function doubleAndAddPoint(array $p, array $q, PrimeInteger $x1) + private function doubleAndAddPoint(array $p, array $q, PrimeInteger $x1): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -180,8 +182,8 @@ class Montgomery extends Base throw new \RuntimeException('Affine coordinates need to be manually converted to XZ coordinates'); } - list($x2, $z2) = $p; - list($x3, $z3) = $q; + [$x2, $z2] = $p; + [$x3, $z3] = $q; $a = $x2->add($z2); $aa = $a->multiply($a); @@ -213,10 +215,8 @@ class Montgomery extends Base * * https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Montgomery_ladder * https://github.com/phpecc/phpecc/issues/16#issuecomment-59176772 - * - * @return array */ - public function multiplyPoint(array $p, BigInteger $d) + public function multiplyPoint(array $p, BigInteger $d): array { $p1 = [$this->one, $this->zero]; $alreadyInternal = isset($x[1]); @@ -228,9 +228,9 @@ class Montgomery extends Base for ($i = 0; $i < strlen($b); $i++) { $b_i = (int) $b[$i]; if ($b_i) { - list($p2, $p1) = $this->doubleAndAddPoint($p2, $p1, $x); + [$p2, $p1] = $this->doubleAndAddPoint($p2, $p1, $x); } else { - list($p1, $p2) = $this->doubleAndAddPoint($p1, $p2, $x); + [$p1, $p2] = $this->doubleAndAddPoint($p1, $p2, $x); } } @@ -248,7 +248,7 @@ class Montgomery extends Base * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToInternal(array $p) + public function convertToInternal(array $p): array { if (empty($p)) { return [clone $this->zero, clone $this->one]; @@ -268,12 +268,12 @@ class Montgomery extends Base * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToAffine(array $p) + public function convertToAffine(array $p): array { if (!isset($p[1])) { return $p; } - list($x, $z) = $p; + [$x, $z] = $p; return [$x->divide($z)]; } } diff --git a/phpseclib/Crypt/EC/BaseCurves/Prime.php b/phpseclib/Crypt/EC/BaseCurves/Prime.php index d6fb2bb5..55b2d79d 100644 --- a/phpseclib/Crypt/EC/BaseCurves/Prime.php +++ b/phpseclib/Crypt/EC/BaseCurves/Prime.php @@ -19,6 +19,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\BaseCurves; use phpseclib3\Common\Functions\Strings; @@ -114,7 +116,7 @@ class Prime extends Base /** * Sets the modulo */ - public function setModulo(BigInteger $modulo) + public function setModulo(BigInteger $modulo): void { $this->modulo = $modulo; $this->factory = new PrimeField($modulo); @@ -129,7 +131,7 @@ class Prime extends Base /** * Set coefficients a and b */ - public function setCoefficients(BigInteger $a, BigInteger $b) + public function setCoefficients(BigInteger $a, BigInteger $b): void { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -143,9 +145,8 @@ class Prime extends Base * * @param BigInteger|PrimeInteger $x * @param BigInteger|PrimeInteger $y - * @return PrimeInteger[] */ - public function setBasePoint($x, $y) + public function setBasePoint($x, $y): void { switch (true) { case !$x instanceof BigInteger && !$x instanceof PrimeInteger: @@ -185,10 +186,10 @@ class Prime extends Base * * @return FiniteField[] */ - protected function jacobianAddPointMixedXY(array $p, array $q) + protected function jacobianAddPointMixedXY(array $p, array $q): array { - list($u1, $s1) = $p; - list($u2, $s2) = $q; + [$u1, $s1] = $p; + [$u2, $s2] = $q; if ($u1->equals($u2)) { if (!$s1->equals($s2)) { return []; @@ -217,10 +218,10 @@ class Prime extends Base * * @return FiniteField[] */ - protected function jacobianAddPointMixedX(array $p, array $q) + protected function jacobianAddPointMixedX(array $p, array $q): array { - list($u1, $s1, $z1) = $p; - list($x2, $y2) = $q; + [$u1, $s1, $z1] = $p; + [$x2, $y2] = $q; $z12 = $z1->multiply($z1); @@ -253,10 +254,10 @@ class Prime extends Base * * @return FiniteField[] */ - protected function jacobianAddPoint(array $p, array $q) + protected function jacobianAddPoint(array $p, array $q): array { - list($x1, $y1, $z1) = $p; - list($x2, $y2, $z2) = $q; + [$x1, $y1, $z1] = $p; + [$x2, $y2, $z2] = $q; $z12 = $z1->multiply($z1); $z22 = $z2->multiply($z2); @@ -292,7 +293,7 @@ class Prime extends Base * * @return FiniteField[] */ - public function addPoint(array $p, array $q) + public function addPoint(array $p, array $q): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -330,7 +331,7 @@ class Prime extends Base if (!$p[1]->equals($q[1])) { return []; } else { // eg. doublePoint - list($numerator, $denominator) = $this->doublePointHelper($p); + [$numerator, $denominator] = $this->doublePointHelper($p); } } else { $numerator = $q[1]->subtract($p[1]); @@ -348,7 +349,7 @@ class Prime extends Base * * @return FiniteField[] */ - protected function doublePointHelper(array $p) + protected function doublePointHelper(array $p): array { $numerator = $this->three->multiply($p[0])->multiply($p[0])->add($this->a); $denominator = $this->two->multiply($p[1]); @@ -360,9 +361,9 @@ class Prime extends Base * * @return FiniteField[] */ - protected function jacobianDoublePoint(array $p) + protected function jacobianDoublePoint(array $p): array { - list($x, $y, $z) = $p; + [$x, $y, $z] = $p; $x2 = $x->multiply($x); $y2 = $y->multiply($y); $z2 = $z->multiply($z); @@ -383,9 +384,9 @@ class Prime extends Base * * @return FiniteField[] */ - protected function jacobianDoublePointMixed(array $p) + protected function jacobianDoublePointMixed(array $p): array { - list($x, $y) = $p; + [$x, $y] = $p; $x2 = $x->multiply($x); $y2 = $y->multiply($y); $s = $this->four->multiply($x)->multiply($y2); @@ -404,7 +405,7 @@ class Prime extends Base * * @return FiniteField[] */ - public function doublePoint(array $p) + public function doublePoint(array $p): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -422,7 +423,7 @@ class Prime extends Base return $this->jacobianDoublePoint($p); } - list($numerator, $denominator) = $this->doublePointHelper($p); + [$numerator, $denominator] = $this->doublePointHelper($p); $slope = $numerator->divide($denominator); @@ -434,10 +435,8 @@ class Prime extends Base /** * Returns the X coordinate and the derived Y coordinate - * - * @return array */ - public function derivePoint($m) + public function derivePoint($m): array { $y = ord(Strings::shift($m)); $x = new BigInteger($m, 256); @@ -469,9 +468,9 @@ class Prime extends Base * * @return boolean */ - public function verifyPoint(array $p) + public function verifyPoint(array $p): bool { - list($x, $y) = $p; + [$x, $y] = $p; $lhs = $y->multiply($y); $temp = $x->multiply($this->a); $temp = $x->multiply($x)->multiply($x)->add($temp); @@ -482,10 +481,8 @@ class Prime extends Base /** * Returns the modulo - * - * @return \phpseclib3\Math\BigInteger */ - public function getModulo() + public function getModulo(): BigInteger { return $this->modulo; } @@ -518,7 +515,7 @@ class Prime extends Base * * @return int[] */ - public function multiplyAddPoints(array $points, array $scalars) + public function multiplyAddPoints(array $points, array $scalars): array { $length = count($points); @@ -527,10 +524,10 @@ class Prime extends Base } $wnd = [$this->getNAFPoints($points[0], 7)]; - $wndWidth = [isset($points[0]['nafwidth']) ? $points[0]['nafwidth'] : 7]; + $wndWidth = [$points[0]['nafwidth'] ?? 7]; for ($i = 1; $i < $length; $i++) { $wnd[] = $this->getNAFPoints($points[$i], 1); - $wndWidth[] = isset($points[$i]['nafwidth']) ? $points[$i]['nafwidth'] : 1; + $wndWidth[] = $points[$i]['nafwidth'] ?? 1; } $naf = []; @@ -582,8 +579,8 @@ class Prime extends Base } for ($j = 0; $j < $max; $j++) { - $ja = isset($jsf[0][$j]) ? $jsf[0][$j] : 0; - $jb = isset($jsf[1][$j]) ? $jsf[1][$j] : 0; + $ja = $jsf[0][$j] ?? 0; + $jb = $jsf[1][$j] ?? 0; $naf[$a][$j] = $index[3 * ($ja + 1) + $jb + 1]; $naf[$b][$j] = 0; @@ -598,7 +595,7 @@ class Prime extends Base while ($i >= 0) { $zero = true; for ($j = 0; $j < $length; $j++) { - $temp[$j] = isset($naf[$j][$i]) ? $naf[$j][$i] : 0; + $temp[$j] = $naf[$j][$i] ?? 0; if ($temp[$j] != 0) { $zero = false; } @@ -645,7 +642,7 @@ class Prime extends Base * * @return int[] */ - private function getNAFPoints($point, $wnd) + private function getNAFPoints($point, $wnd): array { if (isset($point['naf'])) { return $point['naf']; @@ -682,7 +679,7 @@ class Prime extends Base * * @return int[] */ - private static function getJSFPoints(Integer $k1, Integer $k2) + private static function getJSFPoints(Integer $k1, Integer $k2): array { static $three; if (!isset($three)) { @@ -753,12 +750,12 @@ class Prime extends Base * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToAffine(array $p) + public function convertToAffine(array $p): array { if (!isset($p[2])) { return $p; } - list($x, $y, $z) = $p; + [$x, $y, $z] = $p; $z = $this->one->divide($z); $z2 = $z->multiply($z); return [ @@ -772,7 +769,7 @@ class Prime extends Base * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToInternal(array $p) + public function convertToInternal(array $p): array { if (isset($p[2])) { return $p; diff --git a/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php b/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php index 2521a4c0..efd3833f 100644 --- a/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php +++ b/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php @@ -24,6 +24,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\BaseCurves; use phpseclib3\Math\BigInteger; @@ -89,7 +91,7 @@ class TwistedEdwards extends Base /** * Sets the modulo */ - public function setModulo(BigInteger $modulo) + public function setModulo(BigInteger $modulo): void { $this->modulo = $modulo; $this->factory = new PrimeField($modulo); @@ -101,7 +103,7 @@ class TwistedEdwards extends Base /** * Set coefficients a and b */ - public function setCoefficients(BigInteger $a, BigInteger $d) + public function setCoefficients(BigInteger $a, BigInteger $d): void { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -113,7 +115,7 @@ class TwistedEdwards extends Base /** * Set x and y coordinates for the base point */ - public function setBasePoint($x, $y) + public function setBasePoint($x, $y): void { switch (true) { case !$x instanceof BigInteger && !$x instanceof PrimeInteger: @@ -152,10 +154,8 @@ class TwistedEdwards extends Base /** * Retrieve the base point as an array - * - * @return array */ - public function getBasePoint() + public function getBasePoint(): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -173,12 +173,12 @@ class TwistedEdwards extends Base * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToAffine(array $p) + public function convertToAffine(array $p): array { if (!isset($p[2])) { return $p; } - list($x, $y, $z) = $p; + [$x, $y, $z] = $p; $z = $this->one->divide($z); return [ $x->multiply($z), @@ -188,10 +188,8 @@ class TwistedEdwards extends Base /** * Returns the modulo - * - * @return \phpseclib3\Math\BigInteger */ - public function getModulo() + public function getModulo(): BigInteger { return $this->modulo; } @@ -201,9 +199,9 @@ class TwistedEdwards extends Base * * @return boolean */ - public function verifyPoint(array $p) + public function verifyPoint(array $p): bool { - list($x, $y) = $p; + [$x, $y] = $p; $x2 = $x->multiply($x); $y2 = $y->multiply($y); diff --git a/phpseclib/Crypt/EC/Curves/Curve25519.php b/phpseclib/Crypt/EC/Curves/Curve25519.php index 0f3f4d82..2e93626d 100644 --- a/phpseclib/Crypt/EC/Curves/Curve25519.php +++ b/phpseclib/Crypt/EC/Curves/Curve25519.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Montgomery; @@ -42,10 +44,8 @@ class Curve25519 extends Montgomery * Multiply a point on the curve by a scalar * * Modifies the scalar as described at https://tools.ietf.org/html/rfc7748#page-8 - * - * @return array */ - public function multiplyPoint(array $p, BigInteger $d) + public function multiplyPoint(array $p, BigInteger $d): array { //$r = strrev(sodium_crypto_scalarmult($d->toBytes(), strrev($p[0]->toBytes()))); //return [$this->factory->newInteger(new BigInteger($r, 256))]; @@ -61,10 +61,8 @@ class Curve25519 extends Montgomery /** * Creates a random scalar multiplier - * - * @return BigInteger */ - public function createRandomMultiplier() + public function createRandomMultiplier(): BigInteger { return BigInteger::random(256); } @@ -72,7 +70,7 @@ class Curve25519 extends Montgomery /** * Performs range check */ - public function rangeCheck(BigInteger $x) + public function rangeCheck(BigInteger $x): void { if ($x->getLength() > 256 || $x->isNegative()) { throw new \RangeException('x must be a positive integer less than 256 bytes in length'); diff --git a/phpseclib/Crypt/EC/Curves/Curve448.php b/phpseclib/Crypt/EC/Curves/Curve448.php index f4a44231..0a347732 100644 --- a/phpseclib/Crypt/EC/Curves/Curve448.php +++ b/phpseclib/Crypt/EC/Curves/Curve448.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Montgomery; @@ -53,10 +55,8 @@ class Curve448 extends Montgomery * Multiply a point on the curve by a scalar * * Modifies the scalar as described at https://tools.ietf.org/html/rfc7748#page-8 - * - * @return array */ - public function multiplyPoint(array $p, BigInteger $d) + public function multiplyPoint(array $p, BigInteger $d): array { //$r = strrev(sodium_crypto_scalarmult($d->toBytes(), strrev($p[0]->toBytes()))); //return [$this->factory->newInteger(new BigInteger($r, 256))]; @@ -72,10 +72,8 @@ class Curve448 extends Montgomery /** * Creates a random scalar multiplier - * - * @return BigInteger */ - public function createRandomMultiplier() + public function createRandomMultiplier(): BigInteger { return BigInteger::random(446); } @@ -83,7 +81,7 @@ class Curve448 extends Montgomery /** * Performs range check */ - public function rangeCheck(BigInteger $x) + public function rangeCheck(BigInteger $x): void { if ($x->getLength() > 448 || $x->isNegative()) { throw new \RangeException('x must be a positive integer less than 446 bytes in length'); diff --git a/phpseclib/Crypt/EC/Curves/Ed25519.php b/phpseclib/Crypt/EC/Curves/Ed25519.php index 0b776a51..53dd1c8d 100644 --- a/phpseclib/Crypt/EC/Curves/Ed25519.php +++ b/phpseclib/Crypt/EC/Curves/Ed25519.php @@ -10,12 +10,15 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\TwistedEdwards; use phpseclib3\Crypt\Hash; use phpseclib3\Crypt\Random; use phpseclib3\Math\BigInteger; +use phpseclib3\Math\PrimeField\Integer; class Ed25519 extends TwistedEdwards { @@ -100,11 +103,10 @@ class Ed25519 extends TwistedEdwards * * Used by EC\Keys\Common.php * - * @param BigInteger $y * @param boolean $sign * @return object[] */ - public function recoverX(BigInteger $y, $sign) + public function recoverX(BigInteger $y, bool $sign): array { $y = $this->factory->newInteger($y); @@ -155,10 +157,9 @@ class Ed25519 extends TwistedEdwards * * Used by the various key handlers * - * @param string $str * @return \phpseclib3\Math\PrimeField\Integer */ - public function extractSecret($str) + public function extractSecret(string $str) { if (strlen($str) != 32) { throw new \LengthException('Private Key should be 32-bytes long'); @@ -185,13 +186,10 @@ class Ed25519 extends TwistedEdwards /** * Encode a point as a string - * - * @param array $point - * @return string */ - public function encodePoint($point) + public function encodePoint(array $point): string { - list($x, $y) = $point; + [$x, $y] = $point; $y = $y->toBytes(); $y[0] = $y[0] & chr(0x7F); if ($x->isOdd()) { @@ -204,10 +202,8 @@ class Ed25519 extends TwistedEdwards /** * Creates a random scalar multiplier - * - * @return \phpseclib3\Math\PrimeField\Integer */ - public function createRandomMultiplier() + public function createRandomMultiplier(): BigInteger { return $this->extractSecret(Random::string(32)); } @@ -222,7 +218,7 @@ class Ed25519 extends TwistedEdwards * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToInternal(array $p) + public function convertToInternal(array $p): array { if (empty($p)) { return [clone $this->zero, clone $this->one, clone $this->one, clone $this->zero]; @@ -243,7 +239,7 @@ class Ed25519 extends TwistedEdwards * * @return FiniteField[] */ - public function doublePoint(array $p) + public function doublePoint(array $p): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -259,7 +255,7 @@ class Ed25519 extends TwistedEdwards // from https://tools.ietf.org/html/rfc8032#page-12 - list($x1, $y1, $z1, $t1) = $p; + [$x1, $y1, $z1, $t1] = $p; $a = $x1->multiply($x1); $b = $y1->multiply($y1); @@ -283,7 +279,7 @@ class Ed25519 extends TwistedEdwards * * @return FiniteField[] */ - public function addPoint(array $p, array $q) + public function addPoint(array $p, array $q): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -309,8 +305,8 @@ class Ed25519 extends TwistedEdwards // from https://tools.ietf.org/html/rfc8032#page-12 - list($x1, $y1, $z1, $t1) = $p; - list($x2, $y2, $z2, $t2) = $q; + [$x1, $y1, $z1, $t1] = $p; + [$x2, $y2, $z2, $t2] = $q; $a = $y1->subtract($x1)->multiply($y2->subtract($x2)); $b = $y1->add($x1)->multiply($y2->add($x2)); diff --git a/phpseclib/Crypt/EC/Curves/Ed448.php b/phpseclib/Crypt/EC/Curves/Ed448.php index c4b14428..3eb2c031 100644 --- a/phpseclib/Crypt/EC/Curves/Ed448.php +++ b/phpseclib/Crypt/EC/Curves/Ed448.php @@ -10,6 +10,8 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\TwistedEdwards; @@ -56,11 +58,10 @@ class Ed448 extends TwistedEdwards * * Used by EC\Keys\Common.php * - * @param BigInteger $y * @param boolean $sign * @return object[] */ - public function recoverX(BigInteger $y, $sign) + public function recoverX(BigInteger $y, bool $sign): array { $y = $this->factory->newInteger($y); @@ -96,10 +97,9 @@ class Ed448 extends TwistedEdwards * * Used by the various key handlers * - * @param string $str * @return \phpseclib3\Math\PrimeField\Integer */ - public function extractSecret($str) + public function extractSecret(string $str) { if (strlen($str) != 57) { throw new \LengthException('Private Key should be 57-bytes long'); @@ -127,13 +127,10 @@ class Ed448 extends TwistedEdwards /** * Encode a point as a string - * - * @param array $point - * @return string */ - public function encodePoint($point) + public function encodePoint(array $point): string { - list($x, $y) = $point; + [$x, $y] = $point; $y = "\0" . $y->toBytes(); if ($x->isOdd()) { $y[0] = $y[0] | chr(0x80); @@ -145,10 +142,8 @@ class Ed448 extends TwistedEdwards /** * Creates a random scalar multiplier - * - * @return \phpseclib3\Math\PrimeField\Integer */ - public function createRandomMultiplier() + public function createRandomMultiplier(): BigInteger { return $this->extractSecret(Random::string(57)); } @@ -163,7 +158,7 @@ class Ed448 extends TwistedEdwards * * @return \phpseclib3\Math\PrimeField\Integer[] */ - public function convertToInternal(array $p) + public function convertToInternal(array $p): array { if (empty($p)) { return [clone $this->zero, clone $this->one, clone $this->one]; @@ -183,7 +178,7 @@ class Ed448 extends TwistedEdwards * * @return FiniteField[] */ - public function doublePoint(array $p) + public function doublePoint(array $p): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -199,7 +194,7 @@ class Ed448 extends TwistedEdwards // from https://tools.ietf.org/html/rfc8032#page-18 - list($x1, $y1, $z1) = $p; + [$x1, $y1, $z1] = $p; $b = $x1->add($y1); $b = $b->multiply($b); @@ -221,7 +216,7 @@ class Ed448 extends TwistedEdwards * * @return FiniteField[] */ - public function addPoint(array $p, array $q) + public function addPoint(array $p, array $q): array { if (!isset($this->factory)) { throw new \RuntimeException('setModulo needs to be called before this method'); @@ -247,8 +242,8 @@ class Ed448 extends TwistedEdwards // from https://tools.ietf.org/html/rfc8032#page-17 - list($x1, $y1, $z1) = $p; - list($x2, $y2, $z2) = $q; + [$x1, $y1, $z1] = $p; + [$x2, $y2, $z2] = $q; $a = $z1->multiply($z2); $b = $a->multiply($a); diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php index 7bc2272a..f4d7e6fe 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php index ebfb29ae..a87807bc 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php @@ -24,6 +24,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php index 6ec848bc..be90648e 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php index e6a86bbd..da2fb13a 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php index 3d7d8726..fc146e5e 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php index 3d4f9289..8460f8a4 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php index 5780da76..7137ae92 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php index 724d8b8f..dd671167 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php index 182e6227..7d24665c 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php index d5a620d8..33a8939f 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php index a20b4b44..98eb32a2 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php index 366660e6..c9acbca6 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php index 5efe5e1a..475ddfd4 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php index 745863a6..e9db26bd 100644 --- a/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/nistb233.php b/phpseclib/Crypt/EC/Curves/nistb233.php index bae12b06..7182336a 100644 --- a/phpseclib/Crypt/EC/Curves/nistb233.php +++ b/phpseclib/Crypt/EC/Curves/nistb233.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistb233 extends sect233r1 diff --git a/phpseclib/Crypt/EC/Curves/nistb409.php b/phpseclib/Crypt/EC/Curves/nistb409.php index a46153d3..e6eadbc3 100644 --- a/phpseclib/Crypt/EC/Curves/nistb409.php +++ b/phpseclib/Crypt/EC/Curves/nistb409.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistb409 extends sect409r1 diff --git a/phpseclib/Crypt/EC/Curves/nistk163.php b/phpseclib/Crypt/EC/Curves/nistk163.php index 8b263761..ae06c5f5 100644 --- a/phpseclib/Crypt/EC/Curves/nistk163.php +++ b/phpseclib/Crypt/EC/Curves/nistk163.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistk163 extends sect163k1 diff --git a/phpseclib/Crypt/EC/Curves/nistk233.php b/phpseclib/Crypt/EC/Curves/nistk233.php index 69e14138..22f4de02 100644 --- a/phpseclib/Crypt/EC/Curves/nistk233.php +++ b/phpseclib/Crypt/EC/Curves/nistk233.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistk233 extends sect233k1 diff --git a/phpseclib/Crypt/EC/Curves/nistk283.php b/phpseclib/Crypt/EC/Curves/nistk283.php index 9e95f10e..3515fe61 100644 --- a/phpseclib/Crypt/EC/Curves/nistk283.php +++ b/phpseclib/Crypt/EC/Curves/nistk283.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistk283 extends sect283k1 diff --git a/phpseclib/Crypt/EC/Curves/nistk409.php b/phpseclib/Crypt/EC/Curves/nistk409.php index 06bd9af7..c33e11c6 100644 --- a/phpseclib/Crypt/EC/Curves/nistk409.php +++ b/phpseclib/Crypt/EC/Curves/nistk409.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistk409 extends sect409k1 diff --git a/phpseclib/Crypt/EC/Curves/nistp192.php b/phpseclib/Crypt/EC/Curves/nistp192.php index ddead3cf..0999dd8a 100644 --- a/phpseclib/Crypt/EC/Curves/nistp192.php +++ b/phpseclib/Crypt/EC/Curves/nistp192.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistp192 extends secp192r1 diff --git a/phpseclib/Crypt/EC/Curves/nistp224.php b/phpseclib/Crypt/EC/Curves/nistp224.php index 746571b4..732ed6c3 100644 --- a/phpseclib/Crypt/EC/Curves/nistp224.php +++ b/phpseclib/Crypt/EC/Curves/nistp224.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistp224 extends secp224r1 diff --git a/phpseclib/Crypt/EC/Curves/nistp256.php b/phpseclib/Crypt/EC/Curves/nistp256.php index a26c0f99..b63cebf0 100644 --- a/phpseclib/Crypt/EC/Curves/nistp256.php +++ b/phpseclib/Crypt/EC/Curves/nistp256.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistp256 extends secp256r1 diff --git a/phpseclib/Crypt/EC/Curves/nistp384.php b/phpseclib/Crypt/EC/Curves/nistp384.php index 1f20c02d..0c48d9f9 100644 --- a/phpseclib/Crypt/EC/Curves/nistp384.php +++ b/phpseclib/Crypt/EC/Curves/nistp384.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistp384 extends secp384r1 diff --git a/phpseclib/Crypt/EC/Curves/nistp521.php b/phpseclib/Crypt/EC/Curves/nistp521.php index 86fa0508..f6b7fc8e 100644 --- a/phpseclib/Crypt/EC/Curves/nistp521.php +++ b/phpseclib/Crypt/EC/Curves/nistp521.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistp521 extends secp521r1 diff --git a/phpseclib/Crypt/EC/Curves/nistt571.php b/phpseclib/Crypt/EC/Curves/nistt571.php index 7908b38b..eec6570f 100644 --- a/phpseclib/Crypt/EC/Curves/nistt571.php +++ b/phpseclib/Crypt/EC/Curves/nistt571.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class nistt571 extends sect571k1 diff --git a/phpseclib/Crypt/EC/Curves/prime192v1.php b/phpseclib/Crypt/EC/Curves/prime192v1.php index e9c13cd8..c60477cf 100644 --- a/phpseclib/Crypt/EC/Curves/prime192v1.php +++ b/phpseclib/Crypt/EC/Curves/prime192v1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class prime192v1 extends secp192r1 diff --git a/phpseclib/Crypt/EC/Curves/prime192v2.php b/phpseclib/Crypt/EC/Curves/prime192v2.php index e3e341f2..1f94ace0 100644 --- a/phpseclib/Crypt/EC/Curves/prime192v2.php +++ b/phpseclib/Crypt/EC/Curves/prime192v2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/prime192v3.php b/phpseclib/Crypt/EC/Curves/prime192v3.php index 1e97992d..b5ba4575 100644 --- a/phpseclib/Crypt/EC/Curves/prime192v3.php +++ b/phpseclib/Crypt/EC/Curves/prime192v3.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/prime239v1.php b/phpseclib/Crypt/EC/Curves/prime239v1.php index 084be9d7..73b8acbc 100644 --- a/phpseclib/Crypt/EC/Curves/prime239v1.php +++ b/phpseclib/Crypt/EC/Curves/prime239v1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/prime239v2.php b/phpseclib/Crypt/EC/Curves/prime239v2.php index 21941b83..cf5ab8df 100644 --- a/phpseclib/Crypt/EC/Curves/prime239v2.php +++ b/phpseclib/Crypt/EC/Curves/prime239v2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/prime239v3.php b/phpseclib/Crypt/EC/Curves/prime239v3.php index 78c50f06..8ce2095e 100644 --- a/phpseclib/Crypt/EC/Curves/prime239v3.php +++ b/phpseclib/Crypt/EC/Curves/prime239v3.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/prime256v1.php b/phpseclib/Crypt/EC/Curves/prime256v1.php index c72b22e8..905c18eb 100644 --- a/phpseclib/Crypt/EC/Curves/prime256v1.php +++ b/phpseclib/Crypt/EC/Curves/prime256v1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; final class prime256v1 extends secp256r1 diff --git a/phpseclib/Crypt/EC/Curves/secp112r1.php b/phpseclib/Crypt/EC/Curves/secp112r1.php index d1d3194b..686c2dca 100644 --- a/phpseclib/Crypt/EC/Curves/secp112r1.php +++ b/phpseclib/Crypt/EC/Curves/secp112r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp112r2.php b/phpseclib/Crypt/EC/Curves/secp112r2.php index da44e7fd..104dbcff 100644 --- a/phpseclib/Crypt/EC/Curves/secp112r2.php +++ b/phpseclib/Crypt/EC/Curves/secp112r2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp128r1.php b/phpseclib/Crypt/EC/Curves/secp128r1.php index 34456bc0..7866ad47 100644 --- a/phpseclib/Crypt/EC/Curves/secp128r1.php +++ b/phpseclib/Crypt/EC/Curves/secp128r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp128r2.php b/phpseclib/Crypt/EC/Curves/secp128r2.php index e102c340..cf88530c 100644 --- a/phpseclib/Crypt/EC/Curves/secp128r2.php +++ b/phpseclib/Crypt/EC/Curves/secp128r2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp160k1.php b/phpseclib/Crypt/EC/Curves/secp160k1.php index c6a33344..6a4d273c 100644 --- a/phpseclib/Crypt/EC/Curves/secp160k1.php +++ b/phpseclib/Crypt/EC/Curves/secp160k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime; diff --git a/phpseclib/Crypt/EC/Curves/secp160r1.php b/phpseclib/Crypt/EC/Curves/secp160r1.php index af468774..7b84e0d0 100644 --- a/phpseclib/Crypt/EC/Curves/secp160r1.php +++ b/phpseclib/Crypt/EC/Curves/secp160r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp160r2.php b/phpseclib/Crypt/EC/Curves/secp160r2.php index 9bd23d23..6cab3cd9 100644 --- a/phpseclib/Crypt/EC/Curves/secp160r2.php +++ b/phpseclib/Crypt/EC/Curves/secp160r2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp192k1.php b/phpseclib/Crypt/EC/Curves/secp192k1.php index 79ff2e09..952c56e0 100644 --- a/phpseclib/Crypt/EC/Curves/secp192k1.php +++ b/phpseclib/Crypt/EC/Curves/secp192k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime; diff --git a/phpseclib/Crypt/EC/Curves/secp192r1.php b/phpseclib/Crypt/EC/Curves/secp192r1.php index 83ab1c70..5dc8edb7 100644 --- a/phpseclib/Crypt/EC/Curves/secp192r1.php +++ b/phpseclib/Crypt/EC/Curves/secp192r1.php @@ -13,6 +13,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp224k1.php b/phpseclib/Crypt/EC/Curves/secp224k1.php index 79a5c541..bf45dc82 100644 --- a/phpseclib/Crypt/EC/Curves/secp224k1.php +++ b/phpseclib/Crypt/EC/Curves/secp224k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime; diff --git a/phpseclib/Crypt/EC/Curves/secp224r1.php b/phpseclib/Crypt/EC/Curves/secp224r1.php index a9e474a3..278ced44 100644 --- a/phpseclib/Crypt/EC/Curves/secp224r1.php +++ b/phpseclib/Crypt/EC/Curves/secp224r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp256k1.php b/phpseclib/Crypt/EC/Curves/secp256k1.php index 462e7a1c..e886e592 100644 --- a/phpseclib/Crypt/EC/Curves/secp256k1.php +++ b/phpseclib/Crypt/EC/Curves/secp256k1.php @@ -13,6 +13,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; //use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp256r1.php b/phpseclib/Crypt/EC/Curves/secp256r1.php index 9003373c..ddd6b071 100644 --- a/phpseclib/Crypt/EC/Curves/secp256r1.php +++ b/phpseclib/Crypt/EC/Curves/secp256r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp384r1.php b/phpseclib/Crypt/EC/Curves/secp384r1.php index 98764a34..abf748aa 100644 --- a/phpseclib/Crypt/EC/Curves/secp384r1.php +++ b/phpseclib/Crypt/EC/Curves/secp384r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/secp521r1.php b/phpseclib/Crypt/EC/Curves/secp521r1.php index b89a4ea7..9de3a837 100644 --- a/phpseclib/Crypt/EC/Curves/secp521r1.php +++ b/phpseclib/Crypt/EC/Curves/secp521r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Prime; diff --git a/phpseclib/Crypt/EC/Curves/sect113r1.php b/phpseclib/Crypt/EC/Curves/sect113r1.php index 77ec7603..b2f5f277 100644 --- a/phpseclib/Crypt/EC/Curves/sect113r1.php +++ b/phpseclib/Crypt/EC/Curves/sect113r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect113r2.php b/phpseclib/Crypt/EC/Curves/sect113r2.php index 2185d60e..531ccd69 100644 --- a/phpseclib/Crypt/EC/Curves/sect113r2.php +++ b/phpseclib/Crypt/EC/Curves/sect113r2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect131r1.php b/phpseclib/Crypt/EC/Curves/sect131r1.php index 1365cb60..e6d2f4f8 100644 --- a/phpseclib/Crypt/EC/Curves/sect131r1.php +++ b/phpseclib/Crypt/EC/Curves/sect131r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect131r2.php b/phpseclib/Crypt/EC/Curves/sect131r2.php index 93c11b2a..6c8da6aa 100644 --- a/phpseclib/Crypt/EC/Curves/sect131r2.php +++ b/phpseclib/Crypt/EC/Curves/sect131r2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect163k1.php b/phpseclib/Crypt/EC/Curves/sect163k1.php index 3c8574bb..95b5ad37 100644 --- a/phpseclib/Crypt/EC/Curves/sect163k1.php +++ b/phpseclib/Crypt/EC/Curves/sect163k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect163r1.php b/phpseclib/Crypt/EC/Curves/sect163r1.php index 26afd87e..a73e2b39 100644 --- a/phpseclib/Crypt/EC/Curves/sect163r1.php +++ b/phpseclib/Crypt/EC/Curves/sect163r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect163r2.php b/phpseclib/Crypt/EC/Curves/sect163r2.php index 38f94661..3c09aae8 100644 --- a/phpseclib/Crypt/EC/Curves/sect163r2.php +++ b/phpseclib/Crypt/EC/Curves/sect163r2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect193r1.php b/phpseclib/Crypt/EC/Curves/sect193r1.php index 951f261e..3ae056ae 100644 --- a/phpseclib/Crypt/EC/Curves/sect193r1.php +++ b/phpseclib/Crypt/EC/Curves/sect193r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect193r2.php b/phpseclib/Crypt/EC/Curves/sect193r2.php index e3ff47ac..6625f169 100644 --- a/phpseclib/Crypt/EC/Curves/sect193r2.php +++ b/phpseclib/Crypt/EC/Curves/sect193r2.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect233k1.php b/phpseclib/Crypt/EC/Curves/sect233k1.php index eea3f7ad..f2f5035d 100644 --- a/phpseclib/Crypt/EC/Curves/sect233k1.php +++ b/phpseclib/Crypt/EC/Curves/sect233k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect233r1.php b/phpseclib/Crypt/EC/Curves/sect233r1.php index 68219f0e..459a4778 100644 --- a/phpseclib/Crypt/EC/Curves/sect233r1.php +++ b/phpseclib/Crypt/EC/Curves/sect233r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect239k1.php b/phpseclib/Crypt/EC/Curves/sect239k1.php index 0e6994ba..f7c1ce67 100644 --- a/phpseclib/Crypt/EC/Curves/sect239k1.php +++ b/phpseclib/Crypt/EC/Curves/sect239k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect283k1.php b/phpseclib/Crypt/EC/Curves/sect283k1.php index 279c24aa..f9dac72f 100644 --- a/phpseclib/Crypt/EC/Curves/sect283k1.php +++ b/phpseclib/Crypt/EC/Curves/sect283k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect283r1.php b/phpseclib/Crypt/EC/Curves/sect283r1.php index e44a6076..a22d4602 100644 --- a/phpseclib/Crypt/EC/Curves/sect283r1.php +++ b/phpseclib/Crypt/EC/Curves/sect283r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect409k1.php b/phpseclib/Crypt/EC/Curves/sect409k1.php index 1fe329d8..abb3bb25 100644 --- a/phpseclib/Crypt/EC/Curves/sect409k1.php +++ b/phpseclib/Crypt/EC/Curves/sect409k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect409r1.php b/phpseclib/Crypt/EC/Curves/sect409r1.php index 3e209ef8..03a92db1 100644 --- a/phpseclib/Crypt/EC/Curves/sect409r1.php +++ b/phpseclib/Crypt/EC/Curves/sect409r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect571k1.php b/phpseclib/Crypt/EC/Curves/sect571k1.php index 3c54eabd..06901bbb 100644 --- a/phpseclib/Crypt/EC/Curves/sect571k1.php +++ b/phpseclib/Crypt/EC/Curves/sect571k1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Curves/sect571r1.php b/phpseclib/Crypt/EC/Curves/sect571r1.php index 172c1af9..3d79f9e2 100644 --- a/phpseclib/Crypt/EC/Curves/sect571r1.php +++ b/phpseclib/Crypt/EC/Curves/sect571r1.php @@ -11,6 +11,8 @@ * @link http://pear.php.net/package/Math_BigInteger */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Curves; use phpseclib3\Crypt\EC\BaseCurves\Binary; diff --git a/phpseclib/Crypt/EC/Formats/Keys/Common.php b/phpseclib/Crypt/EC/Formats/Keys/Common.php index 88f3af4c..09456a20 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/Common.php +++ b/phpseclib/Crypt/EC/Formats/Keys/Common.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use ParagonIE\ConstantTime\Hex; @@ -55,7 +57,7 @@ trait Common /** * Initialize static variables */ - private static function initialize_static_variables() + private static function initialize_static_variables(): void { if (empty(self::$curveOIDs)) { // the sec* curves are from the standards for efficient cryptography group @@ -183,10 +185,8 @@ trait Common * * If the key contains an implicit curve phpseclib needs the curve * to be explicitly provided - * - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve */ - public static function setImplicitCurve(BaseCurve $curve) + public static function setImplicitCurve(BaseCurve $curve): void { self::$implicitCurve = $curve; } @@ -195,7 +195,6 @@ trait Common * Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based * on the curve parameters * - * @param array $params * @return \phpseclib3\Crypt\EC\BaseCurves\Base|false */ protected static function loadCurveByParam(array $params) @@ -269,11 +268,9 @@ trait Common * * Supports both compressed and uncompressed points * - * @param string $str - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve * @return object[] */ - public static function extractPoint($str, BaseCurve $curve) + public static function extractPoint(string $str, BaseCurve $curve): array { if ($curve instanceof TwistedEdwardsCurve) { // first step of point deciding as discussed at the following URL's: @@ -313,7 +310,7 @@ trait Common // point compression is not being used if ($keylen == 2 * $order + 1) { preg_match("#(.)(.{{$order}})(.{{$order}})#s", $str, $matches); - list(, $w, $x, $y) = $matches; + [, $w, $x, $y] = $matches; if ($w != "\4") { throw new \UnexpectedValueException('The first byte of an uncompressed point should be 04 - not ' . Hex::encode($val)); } @@ -335,15 +332,14 @@ trait Common /** * Encode Parameters * - * @todo Maybe at some point this could be moved to __toString() for each of the curves? - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve * @param bool $returnArray optional * @param array $options optional * @return string|false + *@todo Maybe at some point this could be moved to __toString() for each of the curves? */ - private static function encodeParameters(BaseCurve $curve, $returnArray = false, array $options = []) + private static function encodeParameters(BaseCurve $curve, bool $returnArray = false, array $options = []) { - $useNamedCurves = isset($options['namedCurve']) ? $options['namedCurve'] : self::$useNamedCurves; + $useNamedCurves = $options['namedCurve'] ?? self::$useNamedCurves; $reflect = new \ReflectionClass($curve); $name = $reflect->getShortName(); @@ -383,8 +379,8 @@ trait Common break; } - list($candidateX, $candidateY) = $candidate->getBasePoint(); - list($curveX, $curveY) = $curve->getBasePoint(); + [$candidateX, $candidateY] = $candidate->getBasePoint(); + [$curveX, $curveY] = $curve->getBasePoint(); if ($candidateX->toBytes() != $curveX->toBytes()) { break; } @@ -409,8 +405,8 @@ trait Common break; } - list($candidateX, $candidateY) = $candidate->getBasePoint(); - list($curveX, $curveY) = $curve->getBasePoint(); + [$candidateX, $candidateY] = $candidate->getBasePoint(); + [$curveX, $curveY] = $curve->getBasePoint(); if ($candidateX->toBytes() != $curveX->toBytes()) { break; } @@ -531,7 +527,7 @@ trait Common * A specified curve has all the coefficients, the base points, etc, explicitely included. * A specified curve is a more verbose way of representing a curve */ - public static function useSpecifiedCurve() + public static function useSpecifiedCurve(): void { self::$useNamedCurves = false; } @@ -543,7 +539,7 @@ trait Common * know what the coefficients, the base points, etc, are from the name of the curve. * A named curve is a more concise way of representing a curve */ - public static function useNamedCurve() + public static function useNamedCurve(): void { self::$useNamedCurves = true; } diff --git a/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php b/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php index 3f1d40fc..7e7e23c4 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php +++ b/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPrivate.php @@ -18,6 +18,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use phpseclib3\Crypt\EC\BaseCurves\Montgomery as MontgomeryCurve; @@ -25,6 +27,7 @@ use phpseclib3\Crypt\EC\Curves\Curve25519; use phpseclib3\Crypt\EC\Curves\Curve448; use phpseclib3\Exception\UnsupportedFormatException; use phpseclib3\Math\BigInteger; +use phpseclib3\Math\Common\FiniteField\Integer; /** * Montgomery Curve Private Key Handler @@ -35,18 +38,15 @@ abstract class MontgomeryPrivate { /** * Is invisible flag - * */ const IS_INVISIBLE = true; /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|false $password */ - public static function load($key, $password = '') + public static function load(string $key, $password = ''): array { switch (strlen($key)) { case 32: @@ -71,11 +71,9 @@ abstract class MontgomeryPrivate /** * Convert an EC public key to the appropriate format * - * @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve - * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @return string + * @param Integer[] $publicKey */ - public static function savePublicKey(MontgomeryCurve $curve, array $publicKey) + public static function savePublicKey(MontgomeryCurve $curve, array $publicKey): string { return strrev($publicKey[0]->toBytes()); } @@ -83,13 +81,10 @@ abstract class MontgomeryPrivate /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $privateKey - * @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve - * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @param string $password optional - * @return string + * @param Integer[] $publicKey + * @param string|false $password */ - public static function savePrivateKey(BigInteger $privateKey, MontgomeryCurve $curve, array $publicKey, $password = '') + public static function savePrivateKey(BigInteger $privateKey, MontgomeryCurve $curve, array $publicKey, $password = ''): string { if (!empty($password) && is_string($password)) { throw new UnsupportedFormatException('MontgomeryPrivate private keys do not support encryption'); diff --git a/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPublic.php b/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPublic.php index d1ad48a5..dbc56ab7 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPublic.php +++ b/phpseclib/Crypt/EC/Formats/Keys/MontgomeryPublic.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use phpseclib3\Crypt\EC\BaseCurves\Montgomery as MontgomeryCurve; @@ -27,18 +29,15 @@ abstract class MontgomeryPublic { /** * Is invisible flag - * */ const IS_INVISIBLE = true; /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|false $password */ - public static function load($key, $password = '') + public static function load(string $key, $password = ''): array { switch (strlen($key)) { case 32: @@ -60,11 +59,9 @@ abstract class MontgomeryPublic /** * Convert an EC public key to the appropriate format * - * @param \phpseclib3\Crypt\EC\BaseCurves\Montgomery $curve * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @return string */ - public static function savePublicKey(MontgomeryCurve $curve, array $publicKey) + public static function savePublicKey(MontgomeryCurve $curve, array $publicKey): string { return strrev($publicKey[0]->toBytes()); } diff --git a/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php b/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php index a3aa482f..8212f43f 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php +++ b/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use phpseclib3\Common\Functions\Strings; @@ -46,27 +48,26 @@ abstract class OpenSSH extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { $parsed = parent::load($key, $password); if (isset($parsed['paddedKey'])) { $paddedKey = $parsed['paddedKey']; - list($type) = Strings::unpackSSH2('s', $paddedKey); + [$type] = Strings::unpackSSH2('s', $paddedKey); if ($type != $parsed['type']) { throw new \RuntimeException("The public and private keys are not of the same type ($type vs $parsed[type])"); } if ($type == 'ssh-ed25519') { - list(, $key, $comment) = Strings::unpackSSH2('sss', $paddedKey); + [, $key, $comment] = Strings::unpackSSH2('sss', $paddedKey); $key = libsodium::load($key); $key['comment'] = $comment; return $key; } - list($curveName, $publicKey, $privateKey, $comment) = Strings::unpackSSH2('ssis', $paddedKey); + [$curveName, $publicKey, $privateKey, $comment] = Strings::unpackSSH2('ssis', $paddedKey); $curve = self::loadCurveByParam(['namedCurve' => $curveName]); $curve->rangeCheck($privateKey); return [ @@ -85,7 +86,7 @@ abstract class OpenSSH extends Progenitor $curve = new Ed25519(); $qa = self::extractPoint($parsed['publicKey'], $curve); } else { - list($curveName, $publicKey) = Strings::unpackSSH2('ss', $parsed['publicKey']); + [$curveName, $publicKey] = Strings::unpackSSH2('ss', $parsed['publicKey']); $curveName = '\phpseclib3\Crypt\EC\Curves\\' . $curveName; $curve = new $curveName(); @@ -101,10 +102,8 @@ abstract class OpenSSH extends Progenitor /** * Returns the alias that corresponds to a curve - * - * @return string */ - private static function getAlias(BaseCurve $curve) + private static function getAlias(BaseCurve $curve): string { self::initialize_static_variables(); @@ -134,19 +133,17 @@ abstract class OpenSSH extends Progenitor /** * Convert an EC public key to the appropriate format * - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey * @param array $options optional - * @return string */ - public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = []) + public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = []): string { - $comment = isset($options['comment']) ? $options['comment'] : self::$comment; + $comment = $options['comment'] ?? self::$comment; if ($curve instanceof Ed25519) { $key = Strings::packSSH2('ss', 'ssh-ed25519', $curve->encodePoint($publicKey)); - if (isset($options['binary']) ? $options['binary'] : self::$binary) { + if ($options['binary'] ?? self::$binary) { return $key; } @@ -159,7 +156,7 @@ abstract class OpenSSH extends Progenitor $points = "\4" . $publicKey[0]->toBytes() . $publicKey[1]->toBytes(); $key = Strings::packSSH2('sss', 'ecdsa-sha2-' . $alias, $alias, $points); - if (isset($options['binary']) ? $options['binary'] : self::$binary) { + if ($options['binary'] ?? self::$binary) { return $key; } @@ -171,15 +168,18 @@ abstract class OpenSSH extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $privateKey * @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @param string $password optional + * @param string|false $password * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, $password = '', array $options = []) - { + public static function savePrivateKey( + BigInteger $privateKey, + BaseCurve $curve, + array $publicKey, + $password = '', + array $options = [] + ): string { if ($curve instanceof Ed25519) { if (!isset($privateKey->secret)) { throw new \RuntimeException('Private Key does not have a secret set'); diff --git a/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php b/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php index 51a6d4ea..d3167edd 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php +++ b/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php @@ -23,6 +23,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use ParagonIE\ConstantTime\Base64; @@ -35,6 +37,7 @@ use phpseclib3\Exception\UnsupportedCurveException; use phpseclib3\File\ASN1; use phpseclib3\File\ASN1\Maps; use phpseclib3\Math\BigInteger; +use phpseclib3\Math\Common\FiniteField\Integer; /** * "PKCS1" (RFC5915) Formatted EC Key Handler @@ -48,11 +51,10 @@ abstract class PKCS1 extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { self::initialize_static_variables(); @@ -142,10 +144,8 @@ abstract class PKCS1 extends Progenitor /** * Convert EC parameters to the appropriate format - * - * @return string */ - public static function saveParameters(BaseCurve $curve, array $options = []) + public static function saveParameters(BaseCurve $curve, array $options = []): string { self::initialize_static_variables(); @@ -163,14 +163,11 @@ abstract class PKCS1 extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $privateKey - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve - * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @param string $password optional + * @param Integer[] $publicKey + * @param string|false $password * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, $password = '', array $options = []): string { self::initialize_static_variables(); diff --git a/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php b/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php index 54a3e96f..f56faf16 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php @@ -21,6 +21,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use phpseclib3\Common\Functions\Strings; @@ -34,6 +36,7 @@ use phpseclib3\Exception\UnsupportedCurveException; use phpseclib3\File\ASN1; use phpseclib3\File\ASN1\Maps; use phpseclib3\Math\BigInteger; +use phpseclib3\Math\Common\FiniteField\Integer; /** * PKCS#8 Formatted EC Key Handler @@ -61,11 +64,10 @@ abstract class PKCS8 extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { // initialize_static_variables() is defined in both the trait and the parent class // when it's defined in two places it's the traits one that's called @@ -129,10 +131,8 @@ abstract class PKCS8 extends Progenitor /** * Break a public or private EdDSA key down into its constituent components - * - * @return array */ - private static function loadEdDSA(array $key) + private static function loadEdDSA(array $key): array { $components = []; @@ -165,12 +165,10 @@ abstract class PKCS8 extends Progenitor /** * Convert an EC public key to the appropriate format * - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve - * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey + * @param Integer[] $publicKey * @param array $options optional - * @return string */ - public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = []) + public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = []): string { self::initialize_static_variables(); @@ -196,14 +194,11 @@ abstract class PKCS8 extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $privateKey - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve - * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @param string $password optional + * @param Integer[] $publicKey + * @param string|false $password * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, $password = '', array $options = []): string { self::initialize_static_variables(); diff --git a/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php b/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php index 0a579217..42a03a5d 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php +++ b/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use ParagonIE\ConstantTime\Base64; @@ -51,11 +53,11 @@ abstract class PuTTY extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password + * @return array|false */ - public static function load($key, $password = '') + public static function load($key, $password) { $components = parent::load($key, $password); if (!isset($components['private'])) { @@ -73,7 +75,7 @@ abstract class PuTTY extends Progenitor } $components['dA'] = $components['curve']->extractSecret($private); } else { - list($components['dA']) = Strings::unpackSSH2('i', $private); + [$components['dA']] = Strings::unpackSSH2('i', $private); $components['curve']->rangeCheck($components['dA']); } @@ -83,21 +85,18 @@ abstract class PuTTY extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $privateKey - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey * @param string $password optional * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, $password = false, array $options = []) + public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, $password = false, array $options = []): string { self::initialize_static_variables(); $public = explode(' ', OpenSSH::savePublicKey($curve, $publicKey)); $name = $public[0]; $public = Base64::decode($public[1]); - list(, $length) = unpack('N', Strings::shift($public, 4)); + [, $length] = unpack('N', Strings::shift($public, 4)); Strings::shift($public, $length); // PuTTY pads private keys with a null byte per the following: @@ -119,16 +118,14 @@ abstract class PuTTY extends Progenitor /** * Convert an EC public key to the appropriate format * - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib3\Math\Common\FiniteField[] $publicKey - * @return string */ - public static function savePublicKey(BaseCurve $curve, array $publicKey) + public static function savePublicKey(BaseCurve $curve, array $publicKey): string { $public = explode(' ', OpenSSH::savePublicKey($curve, $publicKey)); $type = $public[0]; $public = Base64::decode($public[1]); - list(, $length) = unpack('N', Strings::shift($public, 4)); + [, $length] = unpack('N', Strings::shift($public, 4)); Strings::shift($public, $length); return self::wrapPublicKey($public, $type); diff --git a/phpseclib/Crypt/EC/Formats/Keys/XML.php b/phpseclib/Crypt/EC/Formats/Keys/XML.php index d548bc27..d452e275 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/XML.php +++ b/phpseclib/Crypt/EC/Formats/Keys/XML.php @@ -16,6 +16,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use ParagonIE\ConstantTime\Base64; @@ -54,11 +56,10 @@ abstract class XML /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { self::initialize_static_variables(); @@ -109,13 +110,11 @@ abstract class XML /** * Case-insensitive xpath query * - * @param \DOMXPath $xpath - * @param string $name - * @param string $error optional + * @param string|null $error optional * @param bool $decode optional - * @return \DOMNodeList + * @return \DOMNodeList|string */ - private static function query($xpath, $name, $error = null, $decode = true) + private static function query(\DOMXPath $xpath, string $name, string $error = null, bool $decode = true) { $query = '/'; $names = explode('/', $name); @@ -135,11 +134,8 @@ abstract class XML /** * Finds the first element in the relevant namespace, strips the namespacing and returns the XML for that element. - * - * @param string $xml - * @param string $ns */ - private static function isolateNamespace($xml, $ns) + private static function isolateNamespace(string $xml, string $ns) { $dom = new \DOMDocument(); if (!$dom->loadXML($xml)) { @@ -160,10 +156,8 @@ abstract class XML /** * Decodes the value - * - * @param string $value */ - private static function decodeValue($value) + private static function decodeValue(string $value): string { return Base64::decode(str_replace(["\r", "\n", ' ', "\t"], '', $value)); } @@ -171,11 +165,9 @@ abstract class XML /** * Extract points from an XML document * - * @param \DOMXPath $xpath - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve * @return object[] */ - private static function extractPointRFC4050(\DOMXPath $xpath, BaseCurve $curve) + private static function extractPointRFC4050(\DOMXPath $xpath, BaseCurve $curve): array { $x = self::query($xpath, 'publickey/x'); $y = self::query($xpath, 'publickey/y'); @@ -199,7 +191,6 @@ abstract class XML * Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based * on the curve parameters * - * @param \DomXPath $xpath * @return \phpseclib3\Crypt\EC\BaseCurves\Base|false */ private static function loadCurveByParam(\DOMXPath $xpath) @@ -279,7 +270,6 @@ abstract class XML * Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based * on the curve parameters * - * @param \DomXPath $xpath * @return \phpseclib3\Crypt\EC\BaseCurves\Base|false */ private static function loadCurveByParamRFC4050(\DOMXPath $xpath) @@ -340,10 +330,8 @@ abstract class XML * Sets the namespace. dsig11 is the most common one. * * Set to null to unset. Used only for creating public keys. - * - * @param string $namespace */ - public static function setNamespace($namespace) + public static function setNamespace(string $namespace): void { self::$namespace = $namespace; } @@ -351,7 +339,7 @@ abstract class XML /** * Uses the XML syntax specified in https://tools.ietf.org/html/rfc4050 */ - public static function enableRFC4050Syntax() + public static function enableRFC4050Syntax(): void { self::$rfc4050 = true; } @@ -359,7 +347,7 @@ abstract class XML /** * Uses the XML syntax specified in https://www.w3.org/TR/xmldsig-core/#sec-ECParameters */ - public static function disableRFC4050Syntax() + public static function disableRFC4050Syntax(): void { self::$rfc4050 = false; } @@ -367,12 +355,10 @@ abstract class XML /** * Convert a public key to the appropriate format * - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey * @param array $options optional - * @return string */ - public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = []) + public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = []): string { self::initialize_static_variables(); @@ -408,12 +394,10 @@ abstract class XML /** * Encode Parameters * - * @param \phpseclib3\Crypt\EC\BaseCurves\Base $curve - * @param string $pre * @param array $options optional * @return string|false */ - private static function encodeXMLParameters(BaseCurve $curve, $pre, array $options = []) + private static function encodeXMLParameters(BaseCurve $curve, string $pre, array $options = []) { $result = self::encodeParameters($curve, true, $options); @@ -435,7 +419,7 @@ abstract class XML '' . $pre . 'PrimeFieldParamsType>' . "\r\n"; $a = $curve->getA(); $b = $curve->getB(); - list($x, $y) = $curve->getBasePoint(); + [$x, $y] = $curve->getBasePoint(); break; default: throw new UnsupportedCurveException('Field Type of ' . $temp['fieldID']['fieldType'] . ' is not supported'); diff --git a/phpseclib/Crypt/EC/Formats/Keys/libsodium.php b/phpseclib/Crypt/EC/Formats/Keys/libsodium.php index c9259a07..7fa32507 100644 --- a/phpseclib/Crypt/EC/Formats/Keys/libsodium.php +++ b/phpseclib/Crypt/EC/Formats/Keys/libsodium.php @@ -15,6 +15,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Keys; use phpseclib3\Crypt\EC\Curves\Ed25519; @@ -32,18 +34,15 @@ abstract class libsodium /** * Is invisible flag - * */ const IS_INVISIBLE = true; /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|false $password optional */ - public static function load($key, $password = '') + public static function load(string $key, $password = ''): array { switch (strlen($key)) { case 32: @@ -79,11 +78,9 @@ abstract class libsodium /** * Convert an EC public key to the appropriate format * - * @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @return string */ - public static function savePublicKey(Ed25519 $curve, array $publicKey) + public static function savePublicKey(Ed25519 $curve, array $publicKey): string { return $curve->encodePoint($publicKey); } @@ -91,13 +88,10 @@ abstract class libsodium /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $privateKey - * @param \phpseclib3\Crypt\EC\Curves\Ed25519 $curve * @param \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey - * @param string $password optional - * @return string + * @param string|false $password */ - public static function savePrivateKey(BigInteger $privateKey, Ed25519 $curve, array $publicKey, $password = '') + public static function savePrivateKey(BigInteger $privateKey, Ed25519 $curve, array $publicKey, $password = ''): string { if (!isset($privateKey->secret)) { throw new \RuntimeException('Private Key does not have a secret set'); diff --git a/phpseclib/Crypt/EC/Formats/Signature/ASN1.php b/phpseclib/Crypt/EC/Formats/Signature/ASN1.php index d2a80a14..288d0045 100644 --- a/phpseclib/Crypt/EC/Formats/Signature/ASN1.php +++ b/phpseclib/Crypt/EC/Formats/Signature/ASN1.php @@ -14,6 +14,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Signature; use phpseclib3\File\ASN1 as Encoder; @@ -30,10 +32,9 @@ abstract class ASN1 /** * Loads a signature * - * @param string $sig * @return array */ - public static function load($sig) + public static function load(string $sig) { if (!is_string($sig)) { return false; @@ -50,12 +51,8 @@ abstract class ASN1 /** * Returns a signature in the appropriate format - * - * @param \phpseclib3\Math\BigInteger $r - * @param \phpseclib3\Math\BigInteger $s - * @return string */ - public static function save(BigInteger $r, BigInteger $s) + public static function save(BigInteger $r, BigInteger $s): string { return Encoder::encodeDER(compact('r', 's'), EcdsaSigValue::MAP); } diff --git a/phpseclib/Crypt/EC/Formats/Signature/Raw.php b/phpseclib/Crypt/EC/Formats/Signature/Raw.php index 7e4b47fe..43b2aadb 100644 --- a/phpseclib/Crypt/EC/Formats/Signature/Raw.php +++ b/phpseclib/Crypt/EC/Formats/Signature/Raw.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Signature; use phpseclib3\Crypt\Common\Formats\Signature\Raw as Progenitor; diff --git a/phpseclib/Crypt/EC/Formats/Signature/SSH2.php b/phpseclib/Crypt/EC/Formats/Signature/SSH2.php index e0644421..dd1f1122 100644 --- a/phpseclib/Crypt/EC/Formats/Signature/SSH2.php +++ b/phpseclib/Crypt/EC/Formats/Signature/SSH2.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Signature; use phpseclib3\Common\Functions\Strings; @@ -27,11 +29,8 @@ abstract class SSH2 { /** * Loads a signature - * - * @param string $sig - * @return mixed */ - public static function load($sig) + public static function load(string $sig) { if (!is_string($sig)) { return false; @@ -41,7 +40,7 @@ abstract class SSH2 if ($result === false) { return false; } - list($type, $blob) = $result; + [$type, $blob] = $result; switch ($type) { // see https://tools.ietf.org/html/rfc5656#section-3.1.2 case 'ecdsa-sha2-nistp256': @@ -66,12 +65,9 @@ abstract class SSH2 /** * Returns a signature in the appropriate format * - * @param \phpseclib3\Math\BigInteger $r - * @param \phpseclib3\Math\BigInteger $s - * @param string $curve * @return string */ - public static function save(BigInteger $r, BigInteger $s, $curve) + public static function save(BigInteger $r, BigInteger $s, string $curve) { switch ($curve) { case 'secp256r1': diff --git a/phpseclib/Crypt/EC/Parameters.php b/phpseclib/Crypt/EC/Parameters.php index c9bf1bea..96782865 100644 --- a/phpseclib/Crypt/EC/Parameters.php +++ b/phpseclib/Crypt/EC/Parameters.php @@ -9,6 +9,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC; use phpseclib3\Crypt\EC; @@ -23,11 +25,9 @@ class Parameters extends EC /** * Returns the parameters * - * @param string $type * @param array $options optional - * @return string */ - public function toString($type = 'PKCS1', array $options = []) + public function toString(string $type = 'PKCS1', array $options = []): string { $type = self::validatePlugin('Keys', 'PKCS1', 'saveParameters'); diff --git a/phpseclib/Crypt/EC/PrivateKey.php b/phpseclib/Crypt/EC/PrivateKey.php index 3632b778..f9991bf8 100644 --- a/phpseclib/Crypt/EC/PrivateKey.php +++ b/phpseclib/Crypt/EC/PrivateKey.php @@ -9,6 +9,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC; use phpseclib3\Common\Functions\Strings; @@ -48,11 +50,8 @@ class PrivateKey extends EC implements Common\PrivateKey * Multiplies an encoded point by the private key * * Used by ECDH - * - * @param string $coordinates - * @return string */ - public function multiply($coordinates) + public function multiply(string $coordinates): string { if ($this->curve instanceof MontgomeryCurve) { if ($this->curve instanceof Curve25519 && self::$engines['libsodium']) { @@ -82,7 +81,6 @@ class PrivateKey extends EC implements Common\PrivateKey * * @see self::verify() * @param string $message - * @return mixed */ public function sign($message) { @@ -118,22 +116,22 @@ class PrivateKey extends EC implements Common\PrivateKey $dom = !isset($this->context) ? '' : 'SigEd25519 no Ed25519 collisions' . "\0" . chr(strlen($this->context)) . $this->context; } else { - $context = isset($this->context) ? $this->context : ''; + $context = $this->context ?? ''; $dom = 'SigEd448' . "\0" . chr(strlen($context)) . $context; } // SHA-512(dom2(F, C) || prefix || PH(M)) $r = $hash->hash($dom . $secret . $message); $r = strrev($r); $r = new BigInteger($r, 256); - list(, $r) = $r->divide($order); + [, $r] = $r->divide($order); $R = $curve->multiplyPoint($curve->getBasePoint(), $r); $R = $curve->encodePoint($R); $k = $hash->hash($dom . $R . $A . $message); $k = strrev($k); $k = new BigInteger($k, 256); - list(, $k) = $k->divide($order); + [, $k] = $k->divide($order); $S = $k->multiply($dA)->add($r); - list(, $S) = $S->divide($order); + [, $S] = $S->divide($order); $S = str_pad(strrev($S->toBytes()), $curve::SIZE, "\0"); return $shortFormat == 'SSH2' ? Strings::packSSH2('ss', 'ssh-' . strtolower($this->getCurve()), $R . $S) : $R . $S; } @@ -166,16 +164,16 @@ class PrivateKey extends EC implements Common\PrivateKey while (true) { $k = BigInteger::randomRange(self::$one, $order->subtract(self::$one)); - list($x, $y) = $this->curve->multiplyPoint($this->curve->getBasePoint(), $k); + [$x, $y] = $this->curve->multiplyPoint($this->curve->getBasePoint(), $k); $x = $x->toBigInteger(); - list(, $r) = $x->divide($order); + [, $r] = $x->divide($order); if ($r->equals(self::$zero)) { continue; } $kinv = $k->modInverse($order); $temp = $z->add($dA->multiply($r)); $temp = $kinv->multiply($temp); - list(, $s) = $temp->divide($order); + [, $s] = $temp->divide($order); if (!$s->equals(self::$zero)) { break; } @@ -209,11 +207,9 @@ class PrivateKey extends EC implements Common\PrivateKey /** * Returns the private key * - * @param string $type * @param array $options optional - * @return string */ - public function toString($type, array $options = []) + public function toString(string $type, array $options = []): string { $type = self::validatePlugin('Keys', $type, 'savePrivateKey'); @@ -224,7 +220,6 @@ class PrivateKey extends EC implements Common\PrivateKey * Returns the public key * * @see self::getPrivateKey() - * @return mixed */ public function getPublicKey() { diff --git a/phpseclib/Crypt/EC/PublicKey.php b/phpseclib/Crypt/EC/PublicKey.php index 609d5960..ef394360 100644 --- a/phpseclib/Crypt/EC/PublicKey.php +++ b/phpseclib/Crypt/EC/PublicKey.php @@ -9,6 +9,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC; use phpseclib3\Common\Functions\Strings; @@ -38,9 +40,8 @@ class PublicKey extends EC implements Common\PublicKey * @see self::verify() * @param string $message * @param string $signature - * @return mixed */ - public function verify($message, $signature) + public function verify($message, $signature): bool { if ($this->curve instanceof MontgomeryCurve) { throw new UnsupportedOperationException('Montgomery Curves cannot be used to create signatures'); @@ -56,7 +57,7 @@ class PublicKey extends EC implements Common\PublicKey if ($this->curve instanceof TwistedEdwardsCurve) { if ($shortFormat == 'SSH2') { - list(, $signature) = Strings::unpackSSH2('ss', $signature); + [, $signature] = Strings::unpackSSH2('ss', $signature); } if ($this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)) { @@ -91,7 +92,7 @@ class PublicKey extends EC implements Common\PublicKey $dom2 = !isset($this->context) ? '' : 'SigEd25519 no Ed25519 collisions' . "\0" . chr(strlen($this->context)) . $this->context; } else { - $context = isset($this->context) ? $this->context : ''; + $context = $this->context ?? ''; $dom2 = 'SigEd448' . "\0" . chr(strlen($context)) . $context; } @@ -99,7 +100,7 @@ class PublicKey extends EC implements Common\PublicKey $k = $hash->hash($dom2 . substr($signature, 0, $curve::SIZE) . $A . $message); $k = strrev($k); $k = new BigInteger($k, 256); - list(, $k) = $k->divide($order); + [, $k] = $k->divide($order); $qa = $curve->convertToInternal($this->QA); @@ -139,19 +140,19 @@ class PublicKey extends EC implements Common\PublicKey $z = $Ln > 0 ? $e->bitwise_rightShift($Ln) : $e; $w = $s->modInverse($order); - list(, $u1) = $z->multiply($w)->divide($order); - list(, $u2) = $r->multiply($w)->divide($order); + [, $u1] = $z->multiply($w)->divide($order); + [, $u2] = $r->multiply($w)->divide($order); $u1 = $this->curve->convertInteger($u1); $u2 = $this->curve->convertInteger($u2); - list($x1, $y1) = $this->curve->multiplyAddPoints( + [$x1, $y1] = $this->curve->multiplyAddPoints( [$this->curve->getBasePoint(), $this->QA], [$u1, $u2] ); $x1 = $x1->toBigInteger(); - list(, $x1) = $x1->divide($order); + [, $x1] = $x1->divide($order); return $x1->equals($r); } @@ -159,11 +160,9 @@ class PublicKey extends EC implements Common\PublicKey /** * Returns the public key * - * @param string $type * @param array $options optional - * @return string */ - public function toString($type, array $options = []) + public function toString(string $type, array $options = []): string { $type = self::validatePlugin('Keys', $type, 'savePublicKey'); diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 5964c57d..6ac2dcd9 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -29,6 +29,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt; use phpseclib3\Common\Functions\Strings; @@ -45,19 +47,16 @@ class Hash { /** * Padding Types - * */ const PADDING_KECCAK = 1; /** * Padding Types - * */ const PADDING_SHA3 = 2; /** * Padding Types - * */ const PADDING_SHAKE = 3; @@ -189,10 +188,8 @@ class Hash /** * Default Constructor. - * - * @param string $hash */ - public function __construct($hash = 'sha256') + public function __construct(string $hash = 'sha256') { $this->setHash($hash); } @@ -204,7 +201,7 @@ class Hash * * @param string $key */ - public function setKey($key = false) + public function setKey($key = false): void { $this->key = $key; $this->computeKey(); @@ -218,7 +215,7 @@ class Hash * * @param string $nonce */ - public function setNonce($nonce = false) + public function setNonce($nonce = false): void { switch (true) { case !is_string($nonce): @@ -240,9 +237,8 @@ class Hash * As documented in https://www.reddit.com/r/PHP/comments/9nct2l/symfonypolyfill_hash_pbkdf2_correct_fix_for/ * when doing an HMAC multiple times it's faster to compute the hash once instead of computing it during * every call - * */ - private function computeKey() + private function computeKey(): void { if ($this->key === false) { $this->computedKey = false; @@ -273,10 +269,8 @@ class Hash /** * Sets the hash function. - * - * @param string $hash */ - public function setHash($hash) + public function setHash(string $hash): void { $this->hashParam = $hash = strtolower($hash); switch ($hash) { @@ -285,7 +279,7 @@ class Hash case 'umac-96': case 'umac-128': $this->blockSize = 128; - $this->length = abs(substr($hash, -3)) >> 3; + $this->length = abs((int) substr($hash, -3)) >> 3; $this->algo = 'umac'; return; case 'md2-96': @@ -441,7 +435,7 @@ class Hash * @param int $numbytes a non-negative integer less than 2^64 * @return string string of length numbytes bytes */ - private function kdf($index, $numbytes) + private function kdf(int $index, int $numbytes): string { $this->c->setIV(pack('N4', 0, $index, 0, 1)); @@ -453,7 +447,7 @@ class Hash * * @return string string of length taglen bytes. */ - private function pdf() + private function pdf(): string { $k = $this->key; $nonce = $this->nonce; @@ -498,7 +492,7 @@ class Hash * @param int $taglen the integer 4, 8, 12 or 16. * @return string string of length taglen bytes. */ - private function uhash($m, $taglen) + private function uhash(string $m, int $taglen): string { // // One internal iteration per 4 bytes of output @@ -546,7 +540,7 @@ class Hash * @param string $m string of length less than 2^67 bits. * @return string string of length (8 * ceil(bitlength(M)/8192)) bytes. */ - private static function L1Hash($k, $m) + private static function L1Hash(string $k, string $m): string { // // Break M into 1024 byte chunks (final chunk may be shorter) @@ -586,7 +580,7 @@ class Hash * @param string $m string with length divisible by 32 bytes. * @return string string of length 8 bytes. */ - private static function nh($k, $m, $length) + private static function nh(string $k, string $m, $length): string { $toUInt32 = function ($x) { $x = new BigInteger($x, 256); @@ -655,7 +649,7 @@ class Hash * @param string $m string of length less than 2^64 bytes. * @return string string of length 16 bytes. */ - private static function L2Hash($k, $m) + private static function L2Hash(string $k, string $m): string { // // Extract keys and restrict to special key-sets @@ -691,12 +685,12 @@ class Hash * POLY Algorithm * * @param int $wordbits the integer 64 or 128. - * @param BigInteger $maxwordrange positive integer less than 2^wordbits. + * @param PrimeField\Integer $maxwordrange positive integer less than 2^wordbits. * @param BigInteger $k integer in the range 0 ... prime(wordbits) - 1. * @param string $m string with length divisible by (wordbits / 8) bytes. - * @return integer in the range 0 ... prime(wordbits) - 1. + * @return string in the range 0 ... prime(wordbits) - 1. */ - private static function poly($wordbits, $maxwordrange, $k, $m) + private static function poly(int $wordbits, PrimeField\Integer $maxwordrange, BigInteger $k, string $m): string { // // Define constants used for fixing out-of-range words @@ -748,7 +742,7 @@ class Hash * @param string $m string of length 16 bytes. * @return string string of length 4 bytes. */ - private static function L3Hash($k1, $k2, $m) + private static function L3Hash(string $k1, string $k2, string $m): string { $factory = self::$factory36; @@ -766,11 +760,8 @@ class Hash /** * Compute the Hash / HMAC / UMAC. - * - * @param string $text - * @return string */ - public function hash($text) + public function hash(string $text): string { $algo = $this->algo; if ($algo == 'umac') { @@ -854,52 +845,40 @@ class Hash /** * Returns the hash length (in bits) - * - * @return int */ - public function getLength() + public function getLength(): int { return $this->length << 3; } /** * Returns the hash length (in bytes) - * - * @return int */ - public function getLengthInBytes() + public function getLengthInBytes(): int { return $this->length; } /** * Returns the block length (in bits) - * - * @return int */ - public function getBlockLength() + public function getBlockLength(): int { return $this->blockSize; } /** * Returns the block length (in bytes) - * - * @return int */ - public function getBlockLengthInBytes() + public function getBlockLengthInBytes(): int { return $this->blockSize >> 3; } /** * Pads SHA3 based on the mode - * - * @param int $padLength - * @param int $padType - * @return string */ - private static function sha3_pad($padLength, $padType) + private static function sha3_pad(int $padLength, int $padType): string { switch ($padType) { case self::PADDING_KECCAK: @@ -936,14 +915,8 @@ class Hash * defined as "the KECCAK instance with KECCAK-f[1600] as the underlying permutation and * capacity c". This is relevant because, altho the KECCAK standard defines a mode * (KECCAK-f[800]) designed for 32-bit machines that mode is incompatible with SHA3 - * - * @param string $p - * @param int $c - * @param int $r - * @param int $d - * @param int $padType */ - private static function sha3_32($p, $c, $r, $d, $padType) + private static function sha3_32(string $p, int $c, int $r, int $d, int $padType): string { $block_size = $r >> 3; $padLength = $block_size - (strlen($p) % $block_size); @@ -996,10 +969,8 @@ class Hash /** * 32-bit block processing method for SHA3 - * - * @param array $s */ - private static function processSHA3Block32(&$s) + private static function processSHA3Block32(array &$s): void { static $rotationOffsets = [ [ 0, 1, 62, 28, 27], @@ -1105,17 +1076,14 @@ class Hash /** * Rotate 32-bit int - * - * @param array $x - * @param int $shift */ - private static function rotateLeft32($x, $shift) + private static function rotateLeft32(array $x, int $shift): array { if ($shift < 32) { - list($hi, $lo) = $x; + [$hi, $lo] = $x; } else { $shift -= 32; - list($lo, $hi) = $x; + [$lo, $hi] = $x; } return [ @@ -1126,14 +1094,8 @@ class Hash /** * Pure-PHP 64-bit implementation of SHA3 - * - * @param string $p - * @param int $c - * @param int $r - * @param int $d - * @param int $padType */ - private static function sha3_64($p, $c, $r, $d, $padType) + private static function sha3_64(string $p, int $c, int $r, int $d, int $padType): string { $block_size = $r >> 3; $padLength = $block_size - (strlen($p) % $block_size); @@ -1185,10 +1147,8 @@ class Hash /** * 64-bit block processing method for SHA3 - * - * @param array $s */ - private static function processSHA3Block64(&$s) + private static function processSHA3Block64(array &$s): void { static $rotationOffsets = [ [ 0, 1, 62, 28, 27], @@ -1271,23 +1231,16 @@ class Hash /** * Rotate 64-bit int - * - * @param int $x - * @param int $shift */ - private static function rotateLeft64($x, $shift) + private static function rotateLeft64(int $x, int $shift): int { return ($x << $shift) | (($x >> (64 - $shift)) & ((1 << $shift) - 1)); } /** * Pure-PHP implementation of SHA512 - * - * @param string $m - * @param array $hash - * @return string */ - private static function sha512($m, $hash) + private static function sha512(string $m, array $hash): string { static $k; diff --git a/phpseclib/Crypt/PublicKeyLoader.php b/phpseclib/Crypt/PublicKeyLoader.php index 61afbaeb..a103dd59 100644 --- a/phpseclib/Crypt/PublicKeyLoader.php +++ b/phpseclib/Crypt/PublicKeyLoader.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt; use phpseclib3\Crypt\Common\AsymmetricKey; @@ -29,11 +31,10 @@ abstract class PublicKeyLoader /** * Loads a public or private key * - * @return AsymmetricKey * @param string|array $key * @param string $password optional */ - public static function load($key, $password = false) + public static function load($key, $password = false): AsymmetricKey { try { return EC::load($key, $password); @@ -66,11 +67,10 @@ abstract class PublicKeyLoader /** * Loads a private key * - * @return PrivateKey * @param string|array $key * @param string $password optional */ - public static function loadPrivateKey($key, $password = false) + public static function loadPrivateKey($key, $password = false): PrivateKey { $key = self::load($key, $password); if (!$key instanceof PrivateKey) { @@ -82,10 +82,9 @@ abstract class PublicKeyLoader /** * Loads a public key * - * @return PublicKey * @param string|array $key */ - public static function loadPublicKey($key) + public static function loadPublicKey($key): PublicKey { $key = self::load($key); if (!$key instanceof PublicKey) { @@ -97,10 +96,9 @@ abstract class PublicKeyLoader /** * Loads parameters * - * @return AsymmetricKey * @param string|array $key */ - public static function loadParameters($key) + public static function loadParameters($key): AsymmetricKey { $key = self::load($key); if (!$key instanceof PrivateKey && !$key instanceof PublicKey) { diff --git a/phpseclib/Crypt/RC2.php b/phpseclib/Crypt/RC2.php index 779a0e25..49d66198 100644 --- a/phpseclib/Crypt/RC2.php +++ b/phpseclib/Crypt/RC2.php @@ -31,6 +31,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt; use phpseclib3\Crypt\Common\BlockCipher; @@ -38,7 +40,6 @@ use phpseclib3\Exception\BadModeException; /** * Pure-PHP implementation of RC2. - * */ class RC2 extends BlockCipher { @@ -252,10 +253,9 @@ class RC2 extends BlockCipher /** * Default Constructor. * - * @param string $mode * @throws \InvalidArgumentException if an invalid / unsupported mode is provided */ - public function __construct($mode) + public function __construct(string $mode) { parent::__construct($mode); @@ -269,11 +269,9 @@ class RC2 extends BlockCipher * * This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct() - * @param int $engine - * @return bool + *@see \phpseclib3\Crypt\Common\SymmetricKey::__construct() */ - protected function isValidEngineHelper($engine) + protected function isValidEngineHelper(int $engine): bool { switch ($engine) { case self::ENGINE_OPENSSL: @@ -297,7 +295,7 @@ class RC2 extends BlockCipher * @param int $length in bits * @throws \LengthException if the key length isn't supported */ - public function setKeyLength($length) + public function setKeyLength(int $length): void { if ($length < 8 || $length > 1024) { throw new \LengthException('Key size of ' . $length . ' bits is not supported by this algorithm. Only keys between 1 and 1024 bits, inclusive, are supported'); @@ -309,10 +307,8 @@ class RC2 extends BlockCipher /** * Returns the current key length - * - * @return int */ - public function getKeyLength() + public function getKeyLength(): int { return $this->current_key_length; } @@ -325,12 +321,10 @@ class RC2 extends BlockCipher * has more then 128 bytes in it, and set $key to a single null byte if * it is empty. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::setKey() - * @param string $key - * @param int|boolean $t1 optional Effective key length in bits. * @throws \LengthException if the key length isn't supported + *@see \phpseclib3\Crypt\Common\SymmetricKey::setKey() */ - public function setKey($key, $t1 = false) + public function setKey(string $key, $t1 = false): void { $this->orig_key = $key; @@ -339,7 +333,7 @@ class RC2 extends BlockCipher } if ($t1 < 1 || $t1 > 1024) { - throw new \LengthException('Key size of ' . $length . ' bits is not supported by this algorithm. Only keys between 1 and 1024 bits, inclusive, are supported'); + //throw new \LengthException('Key size of ' . $t1 . ' bits is not supported by this algorithm. Only keys between 1 and 1024 bits, inclusive, are supported'); } $this->current_key_length = $t1; @@ -386,11 +380,10 @@ class RC2 extends BlockCipher * * Mostly a wrapper for \phpseclib3\Crypt\Common\SymmetricKey::encrypt, with some additional OpenSSL handling code * - * @see self::decrypt() - * @param string $plaintext * @return string $ciphertext + *@see self::decrypt() */ - public function encrypt($plaintext) + public function encrypt(string $plaintext): string { if ($this->engine == self::ENGINE_OPENSSL) { $temp = $this->key; @@ -408,11 +401,10 @@ class RC2 extends BlockCipher * * Mostly a wrapper for \phpseclib3\Crypt\Common\SymmetricKey::decrypt, with some additional OpenSSL handling code * - * @see self::encrypt() - * @param string $ciphertext * @return string $plaintext + *@see self::encrypt() */ - public function decrypt($ciphertext) + public function decrypt(string $ciphertext): string { if ($this->engine == self::ENGINE_OPENSSL) { $temp = $this->key; @@ -428,14 +420,12 @@ class RC2 extends BlockCipher /** * Encrypts a block * - * @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock() + *@see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock() * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt() - * @param string $in - * @return string */ - protected function encryptBlock($in) + protected function encryptBlock(string $in): string { - list($r0, $r1, $r2, $r3) = array_values(unpack('v*', $in)); + [$r0, $r1, $r2, $r3] = array_values(unpack('v*', $in)); $keys = $this->keys; $limit = 20; $actions = [$limit => 44, 44 => 64]; @@ -472,14 +462,12 @@ class RC2 extends BlockCipher /** * Decrypts a block * - * @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock() + *@see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock() * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt() - * @param string $in - * @return string */ - protected function decryptBlock($in) + protected function decryptBlock(string $in): string { - list($r0, $r1, $r2, $r3) = array_values(unpack('v*', $in)); + [$r0, $r1, $r2, $r3] = array_values(unpack('v*', $in)); $keys = $this->keys; $limit = 44; $actions = [$limit => 20, 20 => 0]; @@ -518,7 +506,7 @@ class RC2 extends BlockCipher * * @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey() */ - protected function setupKey() + protected function setupKey(): void { if (!isset($this->key)) { $this->setKey(''); @@ -538,7 +526,7 @@ class RC2 extends BlockCipher * * @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt() */ - protected function setupInlineCrypt() + protected function setupInlineCrypt(): void { // Init code for both, encrypt and decrypt. $init_crypt = '$keys = $this->keys;'; diff --git a/phpseclib/Crypt/RC4.php b/phpseclib/Crypt/RC4.php index f7ee7349..e57c4c3f 100644 --- a/phpseclib/Crypt/RC4.php +++ b/phpseclib/Crypt/RC4.php @@ -40,6 +40,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt; use phpseclib3\Crypt\Common\StreamCipher; @@ -98,11 +100,9 @@ class RC4 extends StreamCipher * * This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine() * - * @see \phpseclib3\Crypt\Common\SymmetricKey::__construct() - * @param int $engine - * @return bool + *@see \phpseclib3\Crypt\Common\SymmetricKey::__construct() */ - protected function isValidEngineHelper($engine) + protected function isValidEngineHelper(int $engine): bool { if ($engine == self::ENGINE_OPENSSL) { if ($this->continuousBuffer) { @@ -135,10 +135,9 @@ class RC4 extends StreamCipher * * Keys can be between 1 and 256 bytes long. * - * @param int $length * @throws \LengthException if the key length is invalid */ - public function setKeyLength($length) + public function setKeyLength(int $length): void { if ($length < 8 || $length > 2048) { throw new \LengthException('Key size of ' . $length . ' bits is not supported by this algorithm. Only keys between 1 and 256 bytes are supported'); @@ -153,10 +152,8 @@ class RC4 extends StreamCipher * Sets the key length * * Keys can be between 1 and 256 bytes long. - * - * @param string $key */ - public function setKey($key) + public function setKey(string $key): void { $length = strlen($key); if ($length < 1 || $length > 256) { @@ -169,12 +166,11 @@ class RC4 extends StreamCipher /** * Encrypts a message. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt() - * @see self::crypt() - * @param string $plaintext * @return string $ciphertext + *@see \phpseclib3\Crypt\Common\SymmetricKey::decrypt() + * @see self::crypt() */ - public function encrypt($plaintext) + public function encrypt(string $plaintext): string { if ($this->engine != self::ENGINE_INTERNAL) { return parent::encrypt($plaintext); @@ -188,12 +184,11 @@ class RC4 extends StreamCipher * $this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)). * At least if the continuous buffer is disabled. * - * @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt() - * @see self::crypt() - * @param string $ciphertext * @return string $plaintext + *@see \phpseclib3\Crypt\Common\SymmetricKey::encrypt() + * @see self::crypt() */ - public function decrypt($ciphertext) + public function decrypt(string $ciphertext): string { if ($this->engine != self::ENGINE_INTERNAL) { return parent::decrypt($ciphertext); @@ -203,22 +198,20 @@ class RC4 extends StreamCipher /** * Encrypts a block - * - * @param string $in */ - protected function encryptBlock($in) + protected function encryptBlock(string $in): string { // RC4 does not utilize this method + return ''; } /** * Decrypts a block - * - * @param string $in */ - protected function decryptBlock($in) + protected function decryptBlock(string $in): string { // RC4 does not utilize this method + return ''; } /** @@ -226,7 +219,7 @@ class RC4 extends StreamCipher * * @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey() */ - protected function setupKey() + protected function setupKey(): void { $key = $this->key; $keyLength = strlen($key); @@ -250,13 +243,11 @@ class RC4 extends StreamCipher /** * Encrypts or decrypts a message. * - * @see self::encrypt() - * @see self::decrypt() - * @param string $text - * @param int $mode * @return string $text + *@see self::decrypt() + * @see self::encrypt() */ - private function crypt($text, $mode) + private function crypt(string $text, int $mode): string { if ($this->changed) { $this->setup(); diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index e96ba359..7be7ecae 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -51,6 +51,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt; use phpseclib3\Crypt\Common\AsymmetricKey; @@ -166,9 +168,9 @@ abstract class RSA extends AsymmetricKey /** * Length of salt * - * @var int + * @var int|null */ - protected $sLen; + protected $sLen = null; /** * Label @@ -201,7 +203,7 @@ abstract class RSA extends AsymmetricKey /** * Modulus length * - * @var \phpseclib3\Math\BigInteger + * @var int */ protected $k; @@ -253,10 +255,8 @@ abstract class RSA extends AsymmetricKey * Sets the public exponent for key generation * * This will be 65537 unless changed. - * - * @param int $val */ - public static function setExponent($val) + public static function setExponent(int $val): void { self::$defaultExponent = $val; } @@ -265,10 +265,8 @@ abstract class RSA extends AsymmetricKey * Sets the smallest prime number in bits. Used for key generation * * This will be 4096 unless changed. - * - * @param int $val */ - public static function setSmallestPrime($val) + public static function setSmallestPrime(int $val): void { self::$smallestPrime = $val; } @@ -277,10 +275,8 @@ abstract class RSA extends AsymmetricKey * Sets the OpenSSL config file path * * Set to the empty string to use the default config file - * - * @param string $val */ - public static function setOpenSSLConfigPath($val) + public static function setOpenSSLConfigPath(string $val): void { self::$configFile = $val; } @@ -290,10 +286,9 @@ abstract class RSA extends AsymmetricKey * * The public key can be extracted from the private key * - * @return RSA - * @param int $bits + *@return RSA */ - public static function createKey($bits = 2048) + public static function createKey(int $bits = 2048) { self::initialize_static_variables(); @@ -348,9 +343,9 @@ abstract class RSA extends AsymmetricKey /** @var BigInteger $min * @var BigInteger $max */ - list($min) = $min->divide($n); + [$min] = $min->divide($n); $min = $min->add(self::$one); - list($max) = $max->divide($n); + [$max] = $max->divide($n); $primes[$i] = BigInteger::randomRangePrime($min, $max); } @@ -370,7 +365,7 @@ abstract class RSA extends AsymmetricKey $lcm['bottom'] = $lcm['bottom'] === false ? $temp : $lcm['bottom']->gcd($temp); } - list($temp) = $lcm['top']->divide($lcm['bottom']); + [$temp] = $lcm['top']->divide($lcm['bottom']); $gcd = $temp->gcd($e); $i0 = 1; } while (!$gcd->equals(self::$one)); @@ -421,10 +416,9 @@ abstract class RSA extends AsymmetricKey /** * OnLoad Handler * - * @return bool - * @param array $components + *@return bool */ - protected static function onLoad($components) + protected static function onLoad(array $components) { $key = $components['isPublicKey'] ? new PublicKey() : @@ -470,7 +464,7 @@ abstract class RSA extends AsymmetricKey /** * Initialize static variables */ - protected static function initialize_static_variables() + protected static function initialize_static_variables(): void { if (!isset(self::$configFile)) { self::$configFile = dirname(__FILE__) . '/../openssl.cnf'; @@ -499,10 +493,9 @@ abstract class RSA extends AsymmetricKey * See {@link http://tools.ietf.org/html/rfc3447#section-4.1 RFC3447#section-4.1}. * * @param bool|\phpseclib3\Math\BigInteger $x - * @param int $xLen * @return bool|string */ - protected function i2osp($x, $xLen) + protected function i2osp($x, int $xLen) { if ($x === false) { return false; @@ -518,11 +511,8 @@ abstract class RSA extends AsymmetricKey * Octet-String-to-Integer primitive * * See {@link http://tools.ietf.org/html/rfc3447#section-4.2 RFC3447#section-4.2}. - * - * @param string $x - * @return \phpseclib3\Math\BigInteger */ - protected function os2ip($x) + protected function os2ip(string $x): BigInteger { return new BigInteger($x, 256); } @@ -532,12 +522,9 @@ abstract class RSA extends AsymmetricKey * * See {@link http://tools.ietf.org/html/rfc3447#section-9.2 RFC3447#section-9.2}. * - * @param string $m - * @param int $emLen - * @throws \LengthException if the intended encoded message length is too short - * @return string + *@throws \LengthException if the intended encoded message length is too short */ - protected function emsa_pkcs1_v1_5_encode($m, $emLen) + protected function emsa_pkcs1_v1_5_encode(string $m, int $emLen): string { $h = $this->hash->hash($m); @@ -594,12 +581,8 @@ abstract class RSA extends AsymmetricKey * id-sha384, id-sha512, id-sha512/224, and id-sha512/256 should * generally be omitted, but if present, it shall have a value of type * NULL" - * - * @param string $m - * @param int $emLen - * @return string */ - protected function emsa_pkcs1_v1_5_encode_without_null($m, $emLen) + protected function emsa_pkcs1_v1_5_encode_without_null(string $m, int $emLen): string { $h = $this->hash->hash($m); @@ -648,12 +631,8 @@ abstract class RSA extends AsymmetricKey * MGF1 * * See {@link http://tools.ietf.org/html/rfc3447#appendix-B.2.1 RFC3447#appendix-B.2.1}. - * - * @param string $mgfSeed - * @param int $maskLen - * @return string */ - protected function mgf1($mgfSeed, $maskLen) + protected function mgf1(string $mgfSeed, int $maskLen): string { // if $maskLen would yield strings larger than 4GB, PKCS#1 suggests a "Mask too long" error be output. @@ -671,10 +650,8 @@ abstract class RSA extends AsymmetricKey * Returns the key size * * More specifically, this returns the size of the modulo in bits. - * - * @return int */ - public function getLength() + public function getLength(): int { return !isset($this->modulus) ? 0 : $this->modulus->getLength(); } @@ -684,10 +661,8 @@ abstract class RSA extends AsymmetricKey * * Used with signature production / verification and (if the encryption mode is self::PADDING_OAEP) encryption and * decryption. - * - * @param string $hash */ - public function withHash($hash) + public function withHash(string $hash): RSA { $new = clone $this; @@ -719,10 +694,8 @@ abstract class RSA extends AsymmetricKey * * The mask generation function is used by self::PADDING_OAEP and self::PADDING_PSS and although it's * best if Hash and MGFHash are set to the same thing this is not a requirement. - * - * @param string $hash */ - public function withMGFHash($hash) + public function withMGFHash(string $hash): RSA { $new = clone $this; @@ -751,9 +724,8 @@ abstract class RSA extends AsymmetricKey /** * Returns the MGF hash algorithm currently being used - * */ - public function getMGFHash() + public function getMGFHash(): Hash { return clone $this->mgfHash; } @@ -767,10 +739,8 @@ abstract class RSA extends AsymmetricKey * * Typical salt lengths in octets are hLen (the length of the output * of the hash function Hash) and 0. - * - * @param int $sLen */ - public function withSaltLength($sLen) + public function withSaltLength(?int $sLen): RSA { $new = clone $this; $new->sLen = $sLen; @@ -779,9 +749,8 @@ abstract class RSA extends AsymmetricKey /** * Returns the salt length currently being used - * */ - public function getSaltLength() + public function getSaltLength(): int { return $this->sLen !== null ? $this->sLen : $this->hLen; } @@ -797,10 +766,8 @@ abstract class RSA extends AsymmetricKey * the value of a label L as input. In this version of PKCS #1, L is * the empty string; other uses of the label are outside the scope of * this document. - * - * @param string $label */ - public function withLabel($label) + public function withLabel(string $label): RSA { $new = clone $this; $new->label = $label; @@ -809,9 +776,8 @@ abstract class RSA extends AsymmetricKey /** * Returns the label currently being used - * */ - public function getLabel() + public function getLabel(): string { return $this->label; } @@ -820,10 +786,8 @@ abstract class RSA extends AsymmetricKey * Determines the padding modes * * Example: $key->withPadding(RSA::ENCRYPTION_PKCS1 | RSA::SIGNATURE_PKCS1); - * - * @param int $padding */ - public function withPadding($padding) + public function withPadding(int $padding): RSA { $masks = [ self::ENCRYPTION_OAEP, @@ -869,9 +833,8 @@ abstract class RSA extends AsymmetricKey /** * Returns the padding currently being used - * */ - public function getPadding() + public function getPadding(): int { return $this->signaturePadding | $this->encryptionPadding; } @@ -886,9 +849,8 @@ abstract class RSA extends AsymmetricKey * * @see self::useInternalEngine() * @see self::useBestEngine() - * @return string */ - public function getEngine() + public function getEngine(): string { if (!isset(self::$engines['PHP'])) { self::useBestEngine(); @@ -900,18 +862,16 @@ abstract class RSA extends AsymmetricKey /** * Enable RSA Blinding - * */ - public static function enableBlinding() + public static function enableBlinding(): void { static::$enableBlinding = true; } /** * Disable RSA Blinding - * */ - public static function disableBlinding() + public static function disableBlinding(): void { static::$enableBlinding = false; } diff --git a/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php b/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php index cbd810bb..853a5f16 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/MSBLOB.php @@ -15,6 +15,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; use ParagonIE\ConstantTime\Base64; @@ -31,48 +33,40 @@ abstract class MSBLOB { /** * Public/Private Key Pair - * */ const PRIVATEKEYBLOB = 0x7; /** * Public Key - * */ const PUBLICKEYBLOB = 0x6; /** * Public Key - * */ const PUBLICKEYBLOBEX = 0xA; /** * RSA public key exchange algorithm - * */ const CALG_RSA_KEYX = 0x0000A400; /** * RSA public key exchange algorithm - * */ const CALG_RSA_SIGN = 0x00002400; /** * Public Key - * */ const RSA1 = 0x31415352; /** * Private Key - * */ const RSA2 = 0x32415352; /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { if (!Strings::is_stringable($key)) { throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key)); @@ -175,16 +169,9 @@ abstract class MSBLOB /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients - * @param string $password optional - * @return string + * @param string|false $password */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '') + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = ''): string { if (count($primes) != 2) { throw new \InvalidArgumentException('MSBLOB does not support multi-prime RSA keys'); @@ -211,12 +198,8 @@ abstract class MSBLOB /** * Convert a public key to the appropriate format - * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @return string */ - public static function savePublicKey(BigInteger $n, BigInteger $e) + public static function savePublicKey(BigInteger $n, BigInteger $e): string { $n = strrev($n->toBytes()); $e = str_pad(strrev($e->toBytes()), 4, "\0"); diff --git a/phpseclib/Crypt/RSA/Formats/Keys/OpenSSH.php b/phpseclib/Crypt/RSA/Formats/Keys/OpenSSH.php index 2367810a..f9b4dbf2 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/OpenSSH.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/OpenSSH.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; use phpseclib3\Common\Functions\Strings; @@ -36,11 +38,10 @@ abstract class OpenSSH extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { static $one; if (!isset($one)) { @@ -50,14 +51,14 @@ abstract class OpenSSH extends Progenitor $parsed = parent::load($key, $password); if (isset($parsed['paddedKey'])) { - list($type) = Strings::unpackSSH2('s', $parsed['paddedKey']); + [$type] = Strings::unpackSSH2('s', $parsed['paddedKey']); if ($type != $parsed['type']) { throw new \RuntimeException("The public and private keys are not of the same type ($type vs $parsed[type])"); } $primes = $coefficients = []; - list( + [ $modulus, $publicExponent, $privateExponent, @@ -65,7 +66,7 @@ abstract class OpenSSH extends Progenitor $primes[1], $primes[2], $comment, - ) = Strings::unpackSSH2('i6s', $parsed['paddedKey']); + ] = Strings::unpackSSH2('i6s', $parsed['paddedKey']); $temp = $primes[1]->subtract($one); $exponents = [1 => $publicExponent->modInverse($temp)]; @@ -77,7 +78,7 @@ abstract class OpenSSH extends Progenitor return compact('publicExponent', 'modulus', 'privateExponent', 'primes', 'coefficients', 'exponents', 'comment', 'isPublicKey'); } - list($publicExponent, $modulus) = Strings::unpackSSH2('ii', $parsed['publicKey']); + [$publicExponent, $modulus] = Strings::unpackSSH2('ii', $parsed['publicKey']); return [ 'isPublicKey' => true, @@ -90,20 +91,17 @@ abstract class OpenSSH extends Progenitor /** * Convert a public key to the appropriate format * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e * @param array $options optional - * @return string */ - public static function savePublicKey(BigInteger $n, BigInteger $e, array $options = []) + public static function savePublicKey(BigInteger $n, BigInteger $e, array $options = []): string { $RSAPublicKey = Strings::packSSH2('sii', 'ssh-rsa', $e, $n); - if (isset($options['binary']) ? $options['binary'] : self::$binary) { + if ($options['binary'] ?? self::$binary) { return $RSAPublicKey; } - $comment = isset($options['comment']) ? $options['comment'] : self::$comment; + $comment = $options['comment'] ?? self::$comment; $RSAPublicKey = 'ssh-rsa ' . base64_encode($RSAPublicKey) . ' ' . $comment; return $RSAPublicKey; @@ -112,17 +110,10 @@ abstract class OpenSSH extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients - * @param string $password optional + * @param string|false $password optional * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []): string { $publicKey = self::savePublicKey($n, $e, ['binary' => true]); $privateKey = Strings::packSSH2('si6', 'ssh-rsa', $n, $e, $d, $coefficients[2], $primes[1], $primes[2]); diff --git a/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php b/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php index b35c7adb..0b8e767d 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/PKCS1.php @@ -20,6 +20,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; use phpseclib3\Common\Functions\Strings; @@ -38,11 +40,10 @@ abstract class PKCS1 extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { if (!Strings::is_stringable($key)) { throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key)); @@ -102,17 +103,10 @@ abstract class PKCS1 extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients - * @param string $password optional + * @param string|false $password * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []): string { $num_primes = count($primes); $key = [ @@ -141,12 +135,8 @@ abstract class PKCS1 extends Progenitor /** * Convert a public key to the appropriate format - * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @return string */ - public static function savePublicKey(BigInteger $n, BigInteger $e) + public static function savePublicKey(BigInteger $n, BigInteger $e): string { $key = [ 'modulus' => $n, diff --git a/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php b/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php index 7ff9a199..569ce086 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/PKCS8.php @@ -23,6 +23,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; use phpseclib3\Common\Functions\Strings; @@ -61,11 +63,10 @@ abstract class PKCS8 extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { if (!Strings::is_stringable($key)) { throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key)); @@ -105,17 +106,10 @@ abstract class PKCS8 extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients - * @param string $password optional + * @param string|false $password * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []): string { $key = PKCS1::savePrivateKey($n, $e, $d, $primes, $exponents, $coefficients); $key = ASN1::extractBER($key); @@ -125,12 +119,9 @@ abstract class PKCS8 extends Progenitor /** * Convert a public key to the appropriate format * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e * @param array $options optional - * @return string */ - public static function savePublicKey(BigInteger $n, BigInteger $e, array $options = []) + public static function savePublicKey(BigInteger $n, BigInteger $e, array $options = []): string { $key = PKCS1::savePublicKey($n, $e); $key = ASN1::extractBER($key); diff --git a/phpseclib/Crypt/RSA/Formats/Keys/PSS.php b/phpseclib/Crypt/RSA/Formats/Keys/PSS.php index ed75b9b7..5465cfc1 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/PSS.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/PSS.php @@ -21,6 +21,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; use phpseclib3\Common\Functions\Strings; @@ -67,7 +69,7 @@ abstract class PSS extends Progenitor /** * Initialize static variables */ - private static function initialize_static_variables() + private static function initialize_static_variables(): void { if (!self::$oidsLoaded) { ASN1::loadOIDs([ @@ -91,11 +93,10 @@ abstract class PSS extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { self::initialize_static_variables(); @@ -154,17 +155,10 @@ abstract class PSS extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients - * @param string $password optional + * @param string|false $password * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []): string { self::initialize_static_variables(); @@ -177,12 +171,9 @@ abstract class PSS extends Progenitor /** * Convert a public key to the appropriate format * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e * @param array $options optional - * @return string */ - public static function savePublicKey(BigInteger $n, BigInteger $e, array $options = []) + public static function savePublicKey(BigInteger $n, BigInteger $e, array $options = []): string { self::initialize_static_variables(); @@ -195,7 +186,6 @@ abstract class PSS extends Progenitor /** * Encodes PSS parameters * - * @param array $options * @return string */ public static function savePSSParams(array $options) diff --git a/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php b/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php index fe35717b..9504184c 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/PuTTY.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; use phpseclib3\Common\Functions\Strings; @@ -41,11 +43,11 @@ abstract class PuTTY extends Progenitor /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param array|string $key + * @param string|false $password + * @return array|false */ - public static function load($key, $password = '') + public static function load($key, $password) { static $one; if (!isset($one)) { @@ -65,14 +67,14 @@ abstract class PuTTY extends Progenitor if ($result === false) { throw new \UnexpectedValueException('Key appears to be malformed'); } - list($publicExponent, $modulus) = $result; + [$publicExponent, $modulus] = $result; $result = Strings::unpackSSH2('iiii', $private); if ($result === false) { throw new \UnexpectedValueException('Key appears to be malformed'); } $primes = $coefficients = []; - list($privateExponent, $primes[1], $primes[2], $coefficients[2]) = $result; + [$privateExponent, $primes[1], $primes[2], $coefficients[2]] = $result; $temp = $primes[1]->subtract($one); $exponents = [1 => $publicExponent->modInverse($temp)]; @@ -85,17 +87,10 @@ abstract class PuTTY extends Progenitor /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients - * @param string $password optional + * @param string|false $password optional * @param array $options optional - * @return string */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []): string { if (count($primes) != 2) { throw new \InvalidArgumentException('PuTTY does not support multi-prime RSA keys'); @@ -109,12 +104,8 @@ abstract class PuTTY extends Progenitor /** * Convert a public key to the appropriate format - * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @return string */ - public static function savePublicKey(BigInteger $n, BigInteger $e) + public static function savePublicKey(BigInteger $n, BigInteger $e): string { return self::wrapPublicKey(Strings::packSSH2('ii', $e, $n), 'ssh-rsa'); } diff --git a/phpseclib/Crypt/RSA/Formats/Keys/Raw.php b/phpseclib/Crypt/RSA/Formats/Keys/Raw.php index db728784..7721d768 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/Raw.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/Raw.php @@ -21,8 +21,11 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; +use phpseclib3\Exception\UnsupportedFormatException; use phpseclib3\Math\BigInteger; /** @@ -35,11 +38,10 @@ abstract class Raw /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|array $key + * @param string|false $password */ - public static function load($key, $password = '') + public static function load($key, $password = ''): array { if (!is_array($key)) { throw new \UnexpectedValueException('Key should be a array - not a ' . gettype($key)); @@ -75,7 +77,7 @@ abstract class Raw ['prime1', 'prime2'] ]; foreach ($indices as $index) { - list($i0, $i1) = $index; + [$i0, $i1] = $index; if (isset($key[$i0]) && isset($key[$i1])) { $components['primes'] = [1 => $key[$i0], $key[$i1]]; } @@ -90,7 +92,7 @@ abstract class Raw ['exponent1', 'exponent2'] ]; foreach ($indices as $index) { - list($i0, $i1) = $index; + [$i0, $i1] = $index; if (isset($key[$i0]) && isset($key[$i1])) { $components['exponents'] = [1 => $key[$i0], $key[$i1]]; } @@ -138,23 +140,16 @@ abstract class Raw /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients - * @param string $password optional + * @param string|false $password optional * @param array $options optional - * @return array */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []) + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '', array $options = []): string { if (!empty($password) && is_string($password)) { throw new UnsupportedFormatException('Raw private keys do not support encryption'); } - return [ + return serialize([ 'e' => clone $e, 'n' => clone $n, 'd' => clone $d, @@ -167,17 +162,13 @@ abstract class Raw 'coefficients' => array_map(function ($var) { return clone $var; }, $coefficients) - ]; + ]); } /** * Convert a public key to the appropriate format - * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @return array */ - public static function savePublicKey(BigInteger $n, BigInteger $e) + public static function savePublicKey(BigInteger $n, BigInteger $e): array { return ['e' => clone $e, 'n' => clone $n]; } diff --git a/phpseclib/Crypt/RSA/Formats/Keys/XML.php b/phpseclib/Crypt/RSA/Formats/Keys/XML.php index d9b7530e..227d6cac 100644 --- a/phpseclib/Crypt/RSA/Formats/Keys/XML.php +++ b/phpseclib/Crypt/RSA/Formats/Keys/XML.php @@ -18,6 +18,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\RSA\Formats\Keys; use ParagonIE\ConstantTime\Base64; @@ -36,11 +38,9 @@ abstract class XML /** * Break a public or private key down into its constituent components * - * @param string $key - * @param string $password optional - * @return array + * @param string|false $password */ - public static function load($key, $password = '') + public static function load(string $key, $password = ''): array { if (!Strings::is_stringable($key)) { throw new \UnexpectedValueException('Key should be a string - not a ' . gettype($key)); @@ -124,16 +124,9 @@ abstract class XML /** * Convert a private key to the appropriate format. * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @param \phpseclib3\Math\BigInteger $d - * @param array $primes - * @param array $exponents - * @param array $coefficients * @param string $password optional - * @return string */ - public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, $password = '') + public static function savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, string $password = ''): string { if (count($primes) != 2) { throw new \InvalidArgumentException('XML does not support multi-prime RSA keys'); @@ -157,12 +150,8 @@ abstract class XML /** * Convert a public key to the appropriate format - * - * @param \phpseclib3\Math\BigInteger $n - * @param \phpseclib3\Math\BigInteger $e - * @return string */ - public static function savePublicKey(BigInteger $n, BigInteger $e) + public static function savePublicKey(BigInteger $n, BigInteger $e): string { return "' . $this->getScreenHelper() . ''; } /** * Returns the current screen and the x previous lines - * - * @return string */ - public function getHistory() + public function getHistory(): string { $scrollback = ''; $last_attr = $this->base_attr_cell; for ($i = 0; $i < count($this->history); $i++) { for ($j = 0; $j <= $this->max_x + 1; $j++) { $cur_attr = $this->history_attrs[$i][$j]; - $scrollback .= $this->processCoordinate($last_attr, $cur_attr, isset($this->history[$i][$j]) ? $this->history[$i][$j] : ''); + $scrollback .= $this->processCoordinate($last_attr, $cur_attr, $this->history[$i][$j] ?? ''); $last_attr = $this->history_attrs[$i][$j]; } $scrollback .= "\r\n"; diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 8915ad0b..1c01decf 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -19,6 +19,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File; use DateTime; @@ -191,9 +193,8 @@ abstract class ASN1 * Serves a similar purpose to openssl's asn1parse * * @param Element|string $encoded - * @return array */ - public static function decodeBER($encoded) + public static function decodeBER($encoded): array { if ($encoded instanceof Element) { $encoded = $encoded->element; @@ -214,12 +215,9 @@ abstract class ASN1 * $encoded is passed by reference for the recursive calls done for self::TYPE_BIT_STRING and * self::TYPE_OCTET_STRING. In those cases, the indefinite length is used. * - * @param string $encoded - * @param int $start - * @param int $encoded_pos * @return array|bool */ - private static function decode_ber($encoded, $start = 0, $encoded_pos = 0) + private static function decode_ber(string $encoded, int $start = 0, int $encoded_pos = 0) { $current = ['start' => $start]; @@ -511,12 +509,10 @@ abstract class ASN1 * * "Special" mappings may be applied on a per tag-name basis via $special. * - * @param array $decoded - * @param array $mapping - * @param array $special + * @param array|bool $decoded * @return array|bool|Element|string|null */ - public static function asn1map($decoded, $mapping, $special = []) + public static function asn1map($decoded, array $mapping, array $special = []) { if (!is_array($decoded)) { return false; @@ -729,7 +725,7 @@ abstract class ASN1 } return $map; case self::TYPE_OBJECT_IDENTIFIER: - return isset(self::$oids[$decoded['content']]) ? self::$oids[$decoded['content']] : $decoded['content']; + return self::$oids[$decoded['content']] ?? $decoded['content']; case self::TYPE_UTC_TIME: case self::TYPE_GENERALIZED_TIME: // for explicitly tagged optional stuff @@ -798,8 +794,7 @@ abstract class ASN1 } if (isset($mapping['mapping'])) { $temp = (int) $temp->toString(); - return isset($mapping['mapping'][$temp]) ? - $mapping['mapping'][$temp] : + return $mapping['mapping'][$temp] ?? false; } return $temp; @@ -811,17 +806,14 @@ abstract class ASN1 * * DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. - * - * @param string $string - * @return int */ - public static function decodeLength(&$string) + public static function decodeLength(string &$string): int { $length = ord(Strings::shift($string)); if ($length & 0x80) { // definite length, long form $length &= 0x7F; $temp = Strings::shift($string, $length); - list(, $length) = unpack('N', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4)); + [, $length] = unpack('N', substr(str_pad($temp, 4, chr(0), STR_PAD_LEFT), -4)); } return $length; } @@ -835,11 +827,9 @@ abstract class ASN1 * "Special" mappings can be applied via $special. * * @param Element|string|array $source - * @param array $mapping - * @param array $special * @return string */ - public static function encodeDER($source, $mapping, $special = []) + public static function encodeDER($source, array $mapping, array $special = []) { self::$location = []; return self::encode_der($source, $mapping, null, $special); @@ -849,12 +839,10 @@ abstract class ASN1 * ASN.1 Encode (Helper function) * * @param Element|string|array|null $source - * @param array $mapping - * @param int $idx - * @param array $special + * @param string|int|null $idx * @return string */ - private static function encode_der($source, $mapping, $idx = null, $special = []) + private static function encode_der($source, array $mapping, $idx = null, array $special = []) { if ($source instanceof Element) { return $source->element; @@ -1131,7 +1119,7 @@ abstract class ASN1 } } - return chr($tag) . self::encodeLength(strlen($value)) . $value; + return chr($tag) . self::encodeLength(strlen((string) $value)) . $value; } /** @@ -1139,10 +1127,9 @@ abstract class ASN1 * * Called by _decode_ber() * - * @param string $content * @return string */ - public static function decodeOID($content) + public static function decodeOID(string $content) { static $eighty; if (!$eighty) { @@ -1190,11 +1177,8 @@ abstract class ASN1 * DER-encode the OID * * Called by _encode_der() - * - * @param string $source - * @return string */ - public static function encodeOID($source) + public static function encodeOID(string $source): string { static $mask, $zero, $forty; if (!$mask) { @@ -1204,7 +1188,7 @@ abstract class ASN1 } if (!preg_match('#(?:\d+\.)+#', $source)) { - $oid = isset(self::$reverseOIDs[$source]) ? self::$reverseOIDs[$source] : false; + $oid = self::$reverseOIDs[$source] ?? false; } else { $oid = $source; } @@ -1248,11 +1232,9 @@ abstract class ASN1 * * Called by _decode_ber() and in the case of implicit tags asn1map(). * - * @param string $content - * @param int $tag * @return \DateTime|false */ - private static function decodeTime($content, $tag) + private static function decodeTime(string $content, int $tag) { /* UTCTime: http://tools.ietf.org/html/rfc5280#section-4.1.2.5.1 @@ -1294,10 +1276,8 @@ abstract class ASN1 * Set the time format * * Sets the time / date format for asn1map(). - * - * @param string $format */ - public static function setTimeFormat($format) + public static function setTimeFormat(string $format): void { self::$format = $format; } @@ -1307,10 +1287,8 @@ abstract class ASN1 * * Load the relevant OIDs for a particular ASN.1 semantic mapping. * Previously loaded OIDs are retained. - * - * @param array $oids */ - public static function loadOIDs($oids) + public static function loadOIDs(array $oids): void { self::$reverseOIDs += $oids; self::$oids = array_flip(self::$reverseOIDs); @@ -1321,10 +1299,8 @@ abstract class ASN1 * * See \phpseclib3\File\X509, etc, for an example. * Previously loaded filters are not retained. - * - * @param array $filters */ - public static function setFilters($filters) + public static function setFilters(array $filters): void { self::$filters = $filters; } @@ -1335,12 +1311,9 @@ abstract class ASN1 * This is a lazy conversion, dealing only with character size. * No real conversion table is used. * - * @param string $in - * @param int $from - * @param int $to * @return string */ - public static function convert($in, $from = self::TYPE_UTF8_STRING, $to = self::TYPE_UTF8_STRING) + public static function convert(string $in, int $from = self::TYPE_UTF8_STRING, int $to = self::TYPE_UTF8_STRING) { // isset(self::STRING_TYPE_SIZE[$from] returns a fatal error on PHP 5.6 if (!array_key_exists($from, self::STRING_TYPE_SIZE) || !array_key_exists($to, self::STRING_TYPE_SIZE)) { @@ -1439,11 +1412,8 @@ abstract class ASN1 /** * Extract raw BER from Base64 encoding - * - * @param string $str - * @return string */ - public static function extractBER($str) + public static function extractBER(string $str): string { /* X.509 certs are assumed to be base64 encoded but sometimes they'll have additional things in them * above and beyond the ceritificate. @@ -1473,11 +1443,8 @@ abstract class ASN1 * * DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. - * - * @param int $length - * @return string */ - public static function encodeLength($length) + public static function encodeLength(int $length): string { if ($length <= 0x7F) { return chr($length); @@ -1501,12 +1468,9 @@ abstract class ASN1 * getOID('2.16.840.1.101.3.4.2.1') == '2.16.840.1.101.3.4.2.1' * getOID('id-sha256') == '2.16.840.1.101.3.4.2.1' * getOID('zzz') == 'zzz' - * - * @param string $name - * @return string */ - public static function getOID($name) + public static function getOID(string $name): string { - return isset(self::$reverseOIDs[$name]) ? self::$reverseOIDs[$name] : $name; + return self::$reverseOIDs[$name] ?? $name; } } diff --git a/phpseclib/File/ASN1/Element.php b/phpseclib/File/ASN1/Element.php index 6540b421..1ccb9895 100644 --- a/phpseclib/File/ASN1/Element.php +++ b/phpseclib/File/ASN1/Element.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1; /** @@ -33,10 +35,9 @@ class Element /** * Constructor * - * @param string $encoded * @return \phpseclib3\File\ASN1\Element */ - public function __construct($encoded) + public function __construct(string $encoded) { $this->element = $encoded; } diff --git a/phpseclib/File/ASN1/Maps/AccessDescription.php b/phpseclib/File/ASN1/Maps/AccessDescription.php index 1cbc5a59..63f1cce7 100644 --- a/phpseclib/File/ASN1/Maps/AccessDescription.php +++ b/phpseclib/File/ASN1/Maps/AccessDescription.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AdministrationDomainName.php b/phpseclib/File/ASN1/Maps/AdministrationDomainName.php index 04183a13..7a8613bd 100644 --- a/phpseclib/File/ASN1/Maps/AdministrationDomainName.php +++ b/phpseclib/File/ASN1/Maps/AdministrationDomainName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php b/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php index 0da7eb10..ebaf29ce 100644 --- a/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php +++ b/phpseclib/File/ASN1/Maps/AlgorithmIdentifier.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AnotherName.php b/phpseclib/File/ASN1/Maps/AnotherName.php index d96c170b..8a7050e6 100644 --- a/phpseclib/File/ASN1/Maps/AnotherName.php +++ b/phpseclib/File/ASN1/Maps/AnotherName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Attribute.php b/phpseclib/File/ASN1/Maps/Attribute.php index 38a6aeef..a5f53378 100644 --- a/phpseclib/File/ASN1/Maps/Attribute.php +++ b/phpseclib/File/ASN1/Maps/Attribute.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AttributeType.php b/phpseclib/File/ASN1/Maps/AttributeType.php index 5cbc2bcc..1377d128 100644 --- a/phpseclib/File/ASN1/Maps/AttributeType.php +++ b/phpseclib/File/ASN1/Maps/AttributeType.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php b/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php index fe414f16..efd69634 100644 --- a/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php +++ b/phpseclib/File/ASN1/Maps/AttributeTypeAndValue.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AttributeValue.php b/phpseclib/File/ASN1/Maps/AttributeValue.php index 3b3b6d2e..a6eb5e26 100644 --- a/phpseclib/File/ASN1/Maps/AttributeValue.php +++ b/phpseclib/File/ASN1/Maps/AttributeValue.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Attributes.php b/phpseclib/File/ASN1/Maps/Attributes.php index cd53ecfa..c593ca94 100644 --- a/phpseclib/File/ASN1/Maps/Attributes.php +++ b/phpseclib/File/ASN1/Maps/Attributes.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php b/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php index 3e80a55d..ade5fc8e 100644 --- a/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php +++ b/phpseclib/File/ASN1/Maps/AuthorityInfoAccessSyntax.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php b/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php index e7ec5b28..7e0b3fd2 100644 --- a/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php +++ b/phpseclib/File/ASN1/Maps/AuthorityKeyIdentifier.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/BaseDistance.php b/phpseclib/File/ASN1/Maps/BaseDistance.php index e59668ab..8839183a 100644 --- a/phpseclib/File/ASN1/Maps/BaseDistance.php +++ b/phpseclib/File/ASN1/Maps/BaseDistance.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/BasicConstraints.php b/phpseclib/File/ASN1/Maps/BasicConstraints.php index 587ef1b0..059b7c18 100644 --- a/phpseclib/File/ASN1/Maps/BasicConstraints.php +++ b/phpseclib/File/ASN1/Maps/BasicConstraints.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php index e81bc78e..dd2012ba 100644 --- a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php +++ b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttribute.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php index 471e88f9..937491cb 100644 --- a/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php +++ b/phpseclib/File/ASN1/Maps/BuiltInDomainDefinedAttributes.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php b/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php index 752f400d..69317cc3 100644 --- a/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php +++ b/phpseclib/File/ASN1/Maps/BuiltInStandardAttributes.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CPSuri.php b/phpseclib/File/ASN1/Maps/CPSuri.php index 56e58887..72dc78fb 100644 --- a/phpseclib/File/ASN1/Maps/CPSuri.php +++ b/phpseclib/File/ASN1/Maps/CPSuri.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php b/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php index 79860b2f..ddc71bae 100644 --- a/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php +++ b/phpseclib/File/ASN1/Maps/CRLDistributionPoints.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CRLNumber.php b/phpseclib/File/ASN1/Maps/CRLNumber.php index f6cb9567..95481b8a 100644 --- a/phpseclib/File/ASN1/Maps/CRLNumber.php +++ b/phpseclib/File/ASN1/Maps/CRLNumber.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CRLReason.php b/phpseclib/File/ASN1/Maps/CRLReason.php index d3736529..423cf6cd 100644 --- a/phpseclib/File/ASN1/Maps/CRLReason.php +++ b/phpseclib/File/ASN1/Maps/CRLReason.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CertPolicyId.php b/phpseclib/File/ASN1/Maps/CertPolicyId.php index d7e7776e..9e4ee036 100644 --- a/phpseclib/File/ASN1/Maps/CertPolicyId.php +++ b/phpseclib/File/ASN1/Maps/CertPolicyId.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Certificate.php b/phpseclib/File/ASN1/Maps/Certificate.php index 01943a0d..11fca6da 100644 --- a/phpseclib/File/ASN1/Maps/Certificate.php +++ b/phpseclib/File/ASN1/Maps/Certificate.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CertificateIssuer.php b/phpseclib/File/ASN1/Maps/CertificateIssuer.php index ccd68dde..cfceb653 100644 --- a/phpseclib/File/ASN1/Maps/CertificateIssuer.php +++ b/phpseclib/File/ASN1/Maps/CertificateIssuer.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; /** diff --git a/phpseclib/File/ASN1/Maps/CertificateList.php b/phpseclib/File/ASN1/Maps/CertificateList.php index d54ed6d9..536f5489 100644 --- a/phpseclib/File/ASN1/Maps/CertificateList.php +++ b/phpseclib/File/ASN1/Maps/CertificateList.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CertificatePolicies.php b/phpseclib/File/ASN1/Maps/CertificatePolicies.php index ec0fa6b5..251d1cc5 100644 --- a/phpseclib/File/ASN1/Maps/CertificatePolicies.php +++ b/phpseclib/File/ASN1/Maps/CertificatePolicies.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CertificateSerialNumber.php b/phpseclib/File/ASN1/Maps/CertificateSerialNumber.php index 06ec944c..4efcb491 100644 --- a/phpseclib/File/ASN1/Maps/CertificateSerialNumber.php +++ b/phpseclib/File/ASN1/Maps/CertificateSerialNumber.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CertificationRequest.php b/phpseclib/File/ASN1/Maps/CertificationRequest.php index 2da70ed6..0102b1cf 100644 --- a/phpseclib/File/ASN1/Maps/CertificationRequest.php +++ b/phpseclib/File/ASN1/Maps/CertificationRequest.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php b/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php index ce6dc880..52434a62 100644 --- a/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php +++ b/phpseclib/File/ASN1/Maps/CertificationRequestInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Characteristic_two.php b/phpseclib/File/ASN1/Maps/Characteristic_two.php index 5bf59bb8..9f57cb6a 100644 --- a/phpseclib/File/ASN1/Maps/Characteristic_two.php +++ b/phpseclib/File/ASN1/Maps/Characteristic_two.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/CountryName.php b/phpseclib/File/ASN1/Maps/CountryName.php index 737d844d..7be8515c 100644 --- a/phpseclib/File/ASN1/Maps/CountryName.php +++ b/phpseclib/File/ASN1/Maps/CountryName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Curve.php b/phpseclib/File/ASN1/Maps/Curve.php index 621f1035..8fcc985f 100644 --- a/phpseclib/File/ASN1/Maps/Curve.php +++ b/phpseclib/File/ASN1/Maps/Curve.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DHParameter.php b/phpseclib/File/ASN1/Maps/DHParameter.php index 26863dbc..d1e13e00 100644 --- a/phpseclib/File/ASN1/Maps/DHParameter.php +++ b/phpseclib/File/ASN1/Maps/DHParameter.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DSAParams.php b/phpseclib/File/ASN1/Maps/DSAParams.php index 7af397bb..136e409f 100644 --- a/phpseclib/File/ASN1/Maps/DSAParams.php +++ b/phpseclib/File/ASN1/Maps/DSAParams.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DSAPrivateKey.php b/phpseclib/File/ASN1/Maps/DSAPrivateKey.php index d97cd023..07e1c5f4 100644 --- a/phpseclib/File/ASN1/Maps/DSAPrivateKey.php +++ b/phpseclib/File/ASN1/Maps/DSAPrivateKey.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DSAPublicKey.php b/phpseclib/File/ASN1/Maps/DSAPublicKey.php index f795747a..b7eb1637 100644 --- a/phpseclib/File/ASN1/Maps/DSAPublicKey.php +++ b/phpseclib/File/ASN1/Maps/DSAPublicKey.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DigestInfo.php b/phpseclib/File/ASN1/Maps/DigestInfo.php index b38ff3c4..fb056c09 100644 --- a/phpseclib/File/ASN1/Maps/DigestInfo.php +++ b/phpseclib/File/ASN1/Maps/DigestInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DirectoryString.php b/phpseclib/File/ASN1/Maps/DirectoryString.php index 45218e3e..9a6f1af2 100644 --- a/phpseclib/File/ASN1/Maps/DirectoryString.php +++ b/phpseclib/File/ASN1/Maps/DirectoryString.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DisplayText.php b/phpseclib/File/ASN1/Maps/DisplayText.php index a13e6a64..5c43b662 100644 --- a/phpseclib/File/ASN1/Maps/DisplayText.php +++ b/phpseclib/File/ASN1/Maps/DisplayText.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DistributionPoint.php b/phpseclib/File/ASN1/Maps/DistributionPoint.php index 4d9af6b5..818fbe82 100644 --- a/phpseclib/File/ASN1/Maps/DistributionPoint.php +++ b/phpseclib/File/ASN1/Maps/DistributionPoint.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DistributionPointName.php b/phpseclib/File/ASN1/Maps/DistributionPointName.php index bc0cec8f..ef7dfb14 100644 --- a/phpseclib/File/ASN1/Maps/DistributionPointName.php +++ b/phpseclib/File/ASN1/Maps/DistributionPointName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/DssSigValue.php b/phpseclib/File/ASN1/Maps/DssSigValue.php index 2af74088..47defa5c 100644 --- a/phpseclib/File/ASN1/Maps/DssSigValue.php +++ b/phpseclib/File/ASN1/Maps/DssSigValue.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ECParameters.php b/phpseclib/File/ASN1/Maps/ECParameters.php index f25f6faa..e39bfcb2 100644 --- a/phpseclib/File/ASN1/Maps/ECParameters.php +++ b/phpseclib/File/ASN1/Maps/ECParameters.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ECPoint.php b/phpseclib/File/ASN1/Maps/ECPoint.php index fb11db83..95de42e9 100644 --- a/phpseclib/File/ASN1/Maps/ECPoint.php +++ b/phpseclib/File/ASN1/Maps/ECPoint.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ECPrivateKey.php b/phpseclib/File/ASN1/Maps/ECPrivateKey.php index 7454f387..cd924985 100644 --- a/phpseclib/File/ASN1/Maps/ECPrivateKey.php +++ b/phpseclib/File/ASN1/Maps/ECPrivateKey.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/EDIPartyName.php b/phpseclib/File/ASN1/Maps/EDIPartyName.php index ea7dcf19..eedbaba1 100644 --- a/phpseclib/File/ASN1/Maps/EDIPartyName.php +++ b/phpseclib/File/ASN1/Maps/EDIPartyName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/EcdsaSigValue.php b/phpseclib/File/ASN1/Maps/EcdsaSigValue.php index 8ab9ff1e..9a2a3b9e 100644 --- a/phpseclib/File/ASN1/Maps/EcdsaSigValue.php +++ b/phpseclib/File/ASN1/Maps/EcdsaSigValue.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/EncryptedData.php b/phpseclib/File/ASN1/Maps/EncryptedData.php index 8d8739e1..0d23ca4f 100644 --- a/phpseclib/File/ASN1/Maps/EncryptedData.php +++ b/phpseclib/File/ASN1/Maps/EncryptedData.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php b/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php index 2c935676..6e7db22e 100644 --- a/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/EncryptedPrivateKeyInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php b/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php index f9bc5def..a765e3c8 100644 --- a/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php +++ b/phpseclib/File/ASN1/Maps/ExtKeyUsageSyntax.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Extension.php b/phpseclib/File/ASN1/Maps/Extension.php index e32668fb..f4a0d1c3 100644 --- a/phpseclib/File/ASN1/Maps/Extension.php +++ b/phpseclib/File/ASN1/Maps/Extension.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ExtensionAttribute.php b/phpseclib/File/ASN1/Maps/ExtensionAttribute.php index 565b36d3..b2600101 100644 --- a/phpseclib/File/ASN1/Maps/ExtensionAttribute.php +++ b/phpseclib/File/ASN1/Maps/ExtensionAttribute.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ExtensionAttributes.php b/phpseclib/File/ASN1/Maps/ExtensionAttributes.php index a2e9bfae..c36878a0 100644 --- a/phpseclib/File/ASN1/Maps/ExtensionAttributes.php +++ b/phpseclib/File/ASN1/Maps/ExtensionAttributes.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Extensions.php b/phpseclib/File/ASN1/Maps/Extensions.php index 5015c976..16293cde 100644 --- a/phpseclib/File/ASN1/Maps/Extensions.php +++ b/phpseclib/File/ASN1/Maps/Extensions.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/FieldElement.php b/phpseclib/File/ASN1/Maps/FieldElement.php index 31734078..3e9b3ed1 100644 --- a/phpseclib/File/ASN1/Maps/FieldElement.php +++ b/phpseclib/File/ASN1/Maps/FieldElement.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/FieldID.php b/phpseclib/File/ASN1/Maps/FieldID.php index e32a9c03..6461f800 100644 --- a/phpseclib/File/ASN1/Maps/FieldID.php +++ b/phpseclib/File/ASN1/Maps/FieldID.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/GeneralName.php b/phpseclib/File/ASN1/Maps/GeneralName.php index 57d86da8..9ef08dc0 100644 --- a/phpseclib/File/ASN1/Maps/GeneralName.php +++ b/phpseclib/File/ASN1/Maps/GeneralName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/GeneralNames.php b/phpseclib/File/ASN1/Maps/GeneralNames.php index 5d931532..1a56e03a 100644 --- a/phpseclib/File/ASN1/Maps/GeneralNames.php +++ b/phpseclib/File/ASN1/Maps/GeneralNames.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/GeneralSubtree.php b/phpseclib/File/ASN1/Maps/GeneralSubtree.php index 5388db55..5f51ec61 100644 --- a/phpseclib/File/ASN1/Maps/GeneralSubtree.php +++ b/phpseclib/File/ASN1/Maps/GeneralSubtree.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/GeneralSubtrees.php b/phpseclib/File/ASN1/Maps/GeneralSubtrees.php index 27548cfe..58301e7e 100644 --- a/phpseclib/File/ASN1/Maps/GeneralSubtrees.php +++ b/phpseclib/File/ASN1/Maps/GeneralSubtrees.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/HashAlgorithm.php b/phpseclib/File/ASN1/Maps/HashAlgorithm.php index deb13cab..b7aa799d 100644 --- a/phpseclib/File/ASN1/Maps/HashAlgorithm.php +++ b/phpseclib/File/ASN1/Maps/HashAlgorithm.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; /** diff --git a/phpseclib/File/ASN1/Maps/HoldInstructionCode.php b/phpseclib/File/ASN1/Maps/HoldInstructionCode.php index 88d6ff3e..6b392fe4 100644 --- a/phpseclib/File/ASN1/Maps/HoldInstructionCode.php +++ b/phpseclib/File/ASN1/Maps/HoldInstructionCode.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/InvalidityDate.php b/phpseclib/File/ASN1/Maps/InvalidityDate.php index f34b5f72..2c89dfeb 100644 --- a/phpseclib/File/ASN1/Maps/InvalidityDate.php +++ b/phpseclib/File/ASN1/Maps/InvalidityDate.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/IssuerAltName.php b/phpseclib/File/ASN1/Maps/IssuerAltName.php index e9d03244..7c895b10 100644 --- a/phpseclib/File/ASN1/Maps/IssuerAltName.php +++ b/phpseclib/File/ASN1/Maps/IssuerAltName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; /** diff --git a/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php b/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php index 415996f5..79ce51e4 100644 --- a/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php +++ b/phpseclib/File/ASN1/Maps/IssuingDistributionPoint.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/KeyIdentifier.php b/phpseclib/File/ASN1/Maps/KeyIdentifier.php index 82a41519..ff62ccaa 100644 --- a/phpseclib/File/ASN1/Maps/KeyIdentifier.php +++ b/phpseclib/File/ASN1/Maps/KeyIdentifier.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/KeyPurposeId.php b/phpseclib/File/ASN1/Maps/KeyPurposeId.php index b8509f19..c28a7707 100644 --- a/phpseclib/File/ASN1/Maps/KeyPurposeId.php +++ b/phpseclib/File/ASN1/Maps/KeyPurposeId.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/KeyUsage.php b/phpseclib/File/ASN1/Maps/KeyUsage.php index 827ce033..f252de3c 100644 --- a/phpseclib/File/ASN1/Maps/KeyUsage.php +++ b/phpseclib/File/ASN1/Maps/KeyUsage.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/MaskGenAlgorithm.php b/phpseclib/File/ASN1/Maps/MaskGenAlgorithm.php index ea3f998b..35bee865 100644 --- a/phpseclib/File/ASN1/Maps/MaskGenAlgorithm.php +++ b/phpseclib/File/ASN1/Maps/MaskGenAlgorithm.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; /** diff --git a/phpseclib/File/ASN1/Maps/Name.php b/phpseclib/File/ASN1/Maps/Name.php index a6a9009d..c11c2891 100644 --- a/phpseclib/File/ASN1/Maps/Name.php +++ b/phpseclib/File/ASN1/Maps/Name.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/NameConstraints.php b/phpseclib/File/ASN1/Maps/NameConstraints.php index 80486f94..7c6725cf 100644 --- a/phpseclib/File/ASN1/Maps/NameConstraints.php +++ b/phpseclib/File/ASN1/Maps/NameConstraints.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/NetworkAddress.php b/phpseclib/File/ASN1/Maps/NetworkAddress.php index 6c68df00..ce2f2f72 100644 --- a/phpseclib/File/ASN1/Maps/NetworkAddress.php +++ b/phpseclib/File/ASN1/Maps/NetworkAddress.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/NoticeReference.php b/phpseclib/File/ASN1/Maps/NoticeReference.php index 9eec123a..dbaa9122 100644 --- a/phpseclib/File/ASN1/Maps/NoticeReference.php +++ b/phpseclib/File/ASN1/Maps/NoticeReference.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/NumericUserIdentifier.php b/phpseclib/File/ASN1/Maps/NumericUserIdentifier.php index 635a89dc..35a79df2 100644 --- a/phpseclib/File/ASN1/Maps/NumericUserIdentifier.php +++ b/phpseclib/File/ASN1/Maps/NumericUserIdentifier.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ORAddress.php b/phpseclib/File/ASN1/Maps/ORAddress.php index b853abe8..686b1049 100644 --- a/phpseclib/File/ASN1/Maps/ORAddress.php +++ b/phpseclib/File/ASN1/Maps/ORAddress.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php b/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php index 59530248..18113988 100644 --- a/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php +++ b/phpseclib/File/ASN1/Maps/OneAsymmetricKey.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/OrganizationName.php b/phpseclib/File/ASN1/Maps/OrganizationName.php index b5cc9491..154ee882 100644 --- a/phpseclib/File/ASN1/Maps/OrganizationName.php +++ b/phpseclib/File/ASN1/Maps/OrganizationName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php b/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php index b3e57809..8c6eec8d 100644 --- a/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php +++ b/phpseclib/File/ASN1/Maps/OrganizationalUnitNames.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php b/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php index 5d565605..ae9e223c 100644 --- a/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php +++ b/phpseclib/File/ASN1/Maps/OtherPrimeInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/OtherPrimeInfos.php b/phpseclib/File/ASN1/Maps/OtherPrimeInfos.php index 9802a808..364858c6 100644 --- a/phpseclib/File/ASN1/Maps/OtherPrimeInfos.php +++ b/phpseclib/File/ASN1/Maps/OtherPrimeInfos.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PBEParameter.php b/phpseclib/File/ASN1/Maps/PBEParameter.php index 8eb27cf6..be928486 100644 --- a/phpseclib/File/ASN1/Maps/PBEParameter.php +++ b/phpseclib/File/ASN1/Maps/PBEParameter.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PBES2params.php b/phpseclib/File/ASN1/Maps/PBES2params.php index bd31699f..873afb78 100644 --- a/phpseclib/File/ASN1/Maps/PBES2params.php +++ b/phpseclib/File/ASN1/Maps/PBES2params.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PBKDF2params.php b/phpseclib/File/ASN1/Maps/PBKDF2params.php index 2dafed9c..f124d616 100644 --- a/phpseclib/File/ASN1/Maps/PBKDF2params.php +++ b/phpseclib/File/ASN1/Maps/PBKDF2params.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PBMAC1params.php b/phpseclib/File/ASN1/Maps/PBMAC1params.php index 91319f58..f30df5e9 100644 --- a/phpseclib/File/ASN1/Maps/PBMAC1params.php +++ b/phpseclib/File/ASN1/Maps/PBMAC1params.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PKCS9String.php b/phpseclib/File/ASN1/Maps/PKCS9String.php index 87d0862f..cb166751 100644 --- a/phpseclib/File/ASN1/Maps/PKCS9String.php +++ b/phpseclib/File/ASN1/Maps/PKCS9String.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Pentanomial.php b/phpseclib/File/ASN1/Maps/Pentanomial.php index b8c8c02f..e93d320a 100644 --- a/phpseclib/File/ASN1/Maps/Pentanomial.php +++ b/phpseclib/File/ASN1/Maps/Pentanomial.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PersonalName.php b/phpseclib/File/ASN1/Maps/PersonalName.php index 14e2860e..5b6443ea 100644 --- a/phpseclib/File/ASN1/Maps/PersonalName.php +++ b/phpseclib/File/ASN1/Maps/PersonalName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PolicyInformation.php b/phpseclib/File/ASN1/Maps/PolicyInformation.php index 1625d199..aebe9b4b 100644 --- a/phpseclib/File/ASN1/Maps/PolicyInformation.php +++ b/phpseclib/File/ASN1/Maps/PolicyInformation.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PolicyMappings.php b/phpseclib/File/ASN1/Maps/PolicyMappings.php index d30b8523..df46ec94 100644 --- a/phpseclib/File/ASN1/Maps/PolicyMappings.php +++ b/phpseclib/File/ASN1/Maps/PolicyMappings.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PolicyQualifierId.php b/phpseclib/File/ASN1/Maps/PolicyQualifierId.php index 7b7cd6a7..51d9dc9d 100644 --- a/phpseclib/File/ASN1/Maps/PolicyQualifierId.php +++ b/phpseclib/File/ASN1/Maps/PolicyQualifierId.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php b/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php index d227702e..8f9b30f0 100644 --- a/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php +++ b/phpseclib/File/ASN1/Maps/PolicyQualifierInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PostalAddress.php b/phpseclib/File/ASN1/Maps/PostalAddress.php index 142b309e..d84ab3cc 100644 --- a/phpseclib/File/ASN1/Maps/PostalAddress.php +++ b/phpseclib/File/ASN1/Maps/PostalAddress.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Prime_p.php b/phpseclib/File/ASN1/Maps/Prime_p.php index 77430344..aa0e48d3 100644 --- a/phpseclib/File/ASN1/Maps/Prime_p.php +++ b/phpseclib/File/ASN1/Maps/Prime_p.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PrivateDomainName.php b/phpseclib/File/ASN1/Maps/PrivateDomainName.php index 195dcaa5..37e8a1c4 100644 --- a/phpseclib/File/ASN1/Maps/PrivateDomainName.php +++ b/phpseclib/File/ASN1/Maps/PrivateDomainName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PrivateKey.php b/phpseclib/File/ASN1/Maps/PrivateKey.php index 3c895941..fd6bc11d 100644 --- a/phpseclib/File/ASN1/Maps/PrivateKey.php +++ b/phpseclib/File/ASN1/Maps/PrivateKey.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php b/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php index b440b78d..255df725 100644 --- a/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/PrivateKeyInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php b/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php index 5b87036e..a5459990 100644 --- a/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php +++ b/phpseclib/File/ASN1/Maps/PrivateKeyUsagePeriod.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PublicKey.php b/phpseclib/File/ASN1/Maps/PublicKey.php index 48409204..3a99940b 100644 --- a/phpseclib/File/ASN1/Maps/PublicKey.php +++ b/phpseclib/File/ASN1/Maps/PublicKey.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php b/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php index 432581e4..c91f010e 100644 --- a/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php +++ b/phpseclib/File/ASN1/Maps/PublicKeyAndChallenge.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/PublicKeyInfo.php b/phpseclib/File/ASN1/Maps/PublicKeyInfo.php index b39a341f..6a612f31 100644 --- a/phpseclib/File/ASN1/Maps/PublicKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/PublicKeyInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/RC2CBCParameter.php b/phpseclib/File/ASN1/Maps/RC2CBCParameter.php index 48649abd..66dce2c1 100644 --- a/phpseclib/File/ASN1/Maps/RC2CBCParameter.php +++ b/phpseclib/File/ASN1/Maps/RC2CBCParameter.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/RDNSequence.php b/phpseclib/File/ASN1/Maps/RDNSequence.php index 04b071c2..cc3a795b 100644 --- a/phpseclib/File/ASN1/Maps/RDNSequence.php +++ b/phpseclib/File/ASN1/Maps/RDNSequence.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/RSAPrivateKey.php b/phpseclib/File/ASN1/Maps/RSAPrivateKey.php index 8c19c658..735b71a3 100644 --- a/phpseclib/File/ASN1/Maps/RSAPrivateKey.php +++ b/phpseclib/File/ASN1/Maps/RSAPrivateKey.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/RSAPublicKey.php b/phpseclib/File/ASN1/Maps/RSAPublicKey.php index b14c32c4..84272c61 100644 --- a/phpseclib/File/ASN1/Maps/RSAPublicKey.php +++ b/phpseclib/File/ASN1/Maps/RSAPublicKey.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php b/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php index 1a784bf4..67e55a03 100644 --- a/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php +++ b/phpseclib/File/ASN1/Maps/RSASSA_PSS_params.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/ReasonFlags.php b/phpseclib/File/ASN1/Maps/ReasonFlags.php index 2e62fcdb..218ec19f 100644 --- a/phpseclib/File/ASN1/Maps/ReasonFlags.php +++ b/phpseclib/File/ASN1/Maps/ReasonFlags.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php b/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php index a0421f73..ce3ef28d 100644 --- a/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php +++ b/phpseclib/File/ASN1/Maps/RelativeDistinguishedName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/RevokedCertificate.php b/phpseclib/File/ASN1/Maps/RevokedCertificate.php index ff759eb7..714e8900 100644 --- a/phpseclib/File/ASN1/Maps/RevokedCertificate.php +++ b/phpseclib/File/ASN1/Maps/RevokedCertificate.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php b/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php index 0f482a26..2f84a907 100644 --- a/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php +++ b/phpseclib/File/ASN1/Maps/SignedPublicKeyAndChallenge.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php b/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php index 7408a563..6699e296 100644 --- a/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php +++ b/phpseclib/File/ASN1/Maps/SpecifiedECDomain.php @@ -13,6 +13,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/SubjectAltName.php b/phpseclib/File/ASN1/Maps/SubjectAltName.php index 39138a94..de3f68d1 100644 --- a/phpseclib/File/ASN1/Maps/SubjectAltName.php +++ b/phpseclib/File/ASN1/Maps/SubjectAltName.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; /** diff --git a/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php b/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php index f2e206f6..2b32bfe2 100644 --- a/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php +++ b/phpseclib/File/ASN1/Maps/SubjectDirectoryAttributes.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php b/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php index 1ff241f7..0fce9d43 100644 --- a/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php +++ b/phpseclib/File/ASN1/Maps/SubjectInfoAccessSyntax.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php b/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php index 0d53d540..d33fbc31 100644 --- a/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php +++ b/phpseclib/File/ASN1/Maps/SubjectPublicKeyInfo.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/TBSCertList.php b/phpseclib/File/ASN1/Maps/TBSCertList.php index 49b3cfc5..456750ce 100644 --- a/phpseclib/File/ASN1/Maps/TBSCertList.php +++ b/phpseclib/File/ASN1/Maps/TBSCertList.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/TBSCertificate.php b/phpseclib/File/ASN1/Maps/TBSCertificate.php index 007360c9..852d0e26 100644 --- a/phpseclib/File/ASN1/Maps/TBSCertificate.php +++ b/phpseclib/File/ASN1/Maps/TBSCertificate.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/TerminalIdentifier.php b/phpseclib/File/ASN1/Maps/TerminalIdentifier.php index 7f6d9d2e..d1ea57f4 100644 --- a/phpseclib/File/ASN1/Maps/TerminalIdentifier.php +++ b/phpseclib/File/ASN1/Maps/TerminalIdentifier.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Time.php b/phpseclib/File/ASN1/Maps/Time.php index 744ee704..231a4934 100644 --- a/phpseclib/File/ASN1/Maps/Time.php +++ b/phpseclib/File/ASN1/Maps/Time.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Trinomial.php b/phpseclib/File/ASN1/Maps/Trinomial.php index 33baa91e..c759bbf3 100644 --- a/phpseclib/File/ASN1/Maps/Trinomial.php +++ b/phpseclib/File/ASN1/Maps/Trinomial.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/UniqueIdentifier.php b/phpseclib/File/ASN1/Maps/UniqueIdentifier.php index f4c954bb..278b1a6c 100644 --- a/phpseclib/File/ASN1/Maps/UniqueIdentifier.php +++ b/phpseclib/File/ASN1/Maps/UniqueIdentifier.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/UserNotice.php b/phpseclib/File/ASN1/Maps/UserNotice.php index 98d527b7..75ccf210 100644 --- a/phpseclib/File/ASN1/Maps/UserNotice.php +++ b/phpseclib/File/ASN1/Maps/UserNotice.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/Validity.php b/phpseclib/File/ASN1/Maps/Validity.php index 8ef64cf5..b04338af 100644 --- a/phpseclib/File/ASN1/Maps/Validity.php +++ b/phpseclib/File/ASN1/Maps/Validity.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/netscape_ca_policy_url.php b/phpseclib/File/ASN1/Maps/netscape_ca_policy_url.php index 2ab15728..e000ec17 100644 --- a/phpseclib/File/ASN1/Maps/netscape_ca_policy_url.php +++ b/phpseclib/File/ASN1/Maps/netscape_ca_policy_url.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/netscape_cert_type.php b/phpseclib/File/ASN1/Maps/netscape_cert_type.php index 49e8da4b..d64431bc 100644 --- a/phpseclib/File/ASN1/Maps/netscape_cert_type.php +++ b/phpseclib/File/ASN1/Maps/netscape_cert_type.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/ASN1/Maps/netscape_comment.php b/phpseclib/File/ASN1/Maps/netscape_comment.php index d3ff4ddf..b0f4d046 100644 --- a/phpseclib/File/ASN1/Maps/netscape_comment.php +++ b/phpseclib/File/ASN1/Maps/netscape_comment.php @@ -11,6 +11,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File\ASN1\Maps; use phpseclib3\File\ASN1; diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 8879c0ab..995b93bb 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -22,6 +22,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\File; use ParagonIE\ConstantTime\Base64; @@ -51,7 +53,6 @@ class X509 * Flag to only accept signatures signed by certificate authorities * * Not really used anymore but retained all the same to suppress E_NOTICEs from old installs - * */ const VALIDATE_SIGNATURE_BY_CA = 1; @@ -429,12 +430,8 @@ class X509 * Load X.509 certificate * * Returns an associative array describing the X.509 cert or a false if the cert failed to load - * - * @param string $cert - * @param int $mode - * @return mixed */ - public function loadX509($cert, $mode = self::FORMAT_AUTO_DETECT) + public function loadX509(string $cert, int $mode = self::FORMAT_AUTO_DETECT) { if (is_array($cert) && isset($cert['tbsCertificate'])) { unset($this->currentCert); @@ -503,11 +500,10 @@ class X509 /** * Save X.509 certificate * - * @param array $cert * @param int $format optional * @return string */ - public function saveX509($cert, $format = self::FORMAT_PEM) + public function saveX509(array $cert, int $format = self::FORMAT_PEM) { if (!is_array($cert) || !isset($cert['tbsCertificate'])) { return false; @@ -575,9 +571,8 @@ class X509 * format. * * @param array $root (by reference) - * @param string $path */ - private function mapInExtensions(&$root, $path) + private function mapInExtensions(array &$root, string $path): void { $extensions = &$this->subArrayUnchecked($root, $path); @@ -623,9 +618,8 @@ class X509 * octet string. * * @param array $root (by reference) - * @param string $path */ - private function mapOutExtensions(&$root, $path) + private function mapOutExtensions(array &$root, string $path): void { $extensions = &$this->subArray($root, $path, !empty($this->extensionValues)); @@ -704,9 +698,8 @@ class X509 * format. * * @param array $root (by reference) - * @param string $path */ - private function mapInAttributes(&$root, $path) + private function mapInAttributes(array &$root, string $path): void { $attributes = &$this->subArray($root, $path); @@ -726,8 +719,8 @@ class X509 if ($mapped !== false) { $values[$j] = $mapped; } - if ($id == 'pkcs-9-at-extensionRequest' && $this->isSubArrayValid($values, $j)) { - $this->mapInExtensions($values, $j); + if ($id == 'pkcs-9-at-extensionRequest' && $this->isSubArrayValid($values, (string) $j)) { + $this->mapInExtensions($values, (string) $j); } } elseif ($map) { $values[$j] = $value; @@ -743,9 +736,8 @@ class X509 * ANY type. * * @param array $root (by reference) - * @param string $path */ - private function mapOutAttributes(&$root, $path) + private function mapOutAttributes(array &$root, string $path): void { $attributes = &$this->subArray($root, $path); @@ -784,9 +776,8 @@ class X509 * format. * * @param array $root (by reference) - * @param string $path */ - private function mapInDNs(&$root, $path) + private function mapInDNs(array &$root, string $path): void { $dns = &$this->subArray($root, $path); @@ -812,9 +803,8 @@ class X509 * ANY type. * * @param array $root (by reference) - * @param string $path */ - private function mapOutDNs(&$root, $path) + private function mapOutDNs(array &$root, string $path): void { $dns = &$this->subArray($root, $path); @@ -839,11 +829,8 @@ class X509 /** * Associate an extension ID to an extension mapping - * - * @param string $extnId - * @return mixed */ - private function getMapping($extnId) + private function getMapping(string $extnId) { if (!is_string($extnId)) { // eg. if it's a \phpseclib3\File\ASN1\Element object return true; @@ -948,11 +935,8 @@ class X509 /** * Load an X.509 certificate as a certificate authority - * - * @param string $cert - * @return bool */ - public function loadCA($cert) + public function loadCA(string $cert): bool { $olddn = $this->dn; $oldcert = $this->currentCert; @@ -1014,11 +998,8 @@ class X509 * character * which is considered to match any single domain name * component or component fragment. E.g., *.a.com matches foo.a.com but * not bar.foo.a.com. f*.com matches foo.com but not bar.com. - * - * @param string $url - * @return bool */ - public function validateURL($url) + public function validateURL(string $url): bool { if (!is_array($this->currentCert) || !isset($this->currentCert['tbsCertificate'])) { return false; @@ -1075,9 +1056,8 @@ class X509 * If $date isn't defined it is assumed to be the current date. * * @param \DateTimeInterface|string $date optional - * @return bool */ - public function validateDate($date = null) + public function validateDate($date = null): bool { if (!is_array($this->currentCert) || !isset($this->currentCert['tbsCertificate'])) { return false; @@ -1088,10 +1068,10 @@ class X509 } $notBefore = $this->currentCert['tbsCertificate']['validity']['notBefore']; - $notBefore = isset($notBefore['generalTime']) ? $notBefore['generalTime'] : $notBefore['utcTime']; + $notBefore = $notBefore['generalTime'] ?? $notBefore['utcTime']; $notAfter = $this->currentCert['tbsCertificate']['validity']['notAfter']; - $notAfter = isset($notAfter['generalTime']) ? $notAfter['generalTime'] : $notAfter['utcTime']; + $notAfter = $notAfter['generalTime'] ?? $notAfter['utcTime']; if (is_string($date)) { $date = new \DateTimeImmutable($date, new \DateTimeZone(@date_default_timezone_get())); @@ -1106,10 +1086,9 @@ class X509 /** * Fetches a URL * - * @param string $url * @return bool|string */ - private static function fetchURL($url) + private static function fetchURL(string $url) { if (self::$disable_url_fetch) { return false; @@ -1119,7 +1098,7 @@ class X509 $data = ''; switch ($parts['scheme']) { case 'http': - $fsock = @fsockopen($parts['host'], isset($parts['port']) ? $parts['port'] : 80); + $fsock = @fsockopen($parts['host'], $parts['port'] ?? 80); if (!$fsock) { return false; } @@ -1159,12 +1138,8 @@ class X509 * Validates an intermediate cert as identified via authority info access extension * * See https://tools.ietf.org/html/rfc4325 for more info - * - * @param bool $caonly - * @param int $count - * @return bool */ - private function testForIntermediate($caonly, $count) + private function testForIntermediate(bool $caonly, int $count): bool { $opts = $this->getExtension('id-pe-authorityInfoAccess'); if (!is_array($opts)) { @@ -1228,9 +1203,8 @@ class X509 * The behavior of this function is inspired by {@link http://php.net/openssl-verify openssl_verify}. * * @param bool $caonly optional - * @return mixed */ - public function validateSignature($caonly = true) + public function validateSignature(bool $caonly = true): ?bool { return $this->validateSignatureCountable($caonly, 0); } @@ -1239,12 +1213,8 @@ class X509 * Validate a signature * * Performs said validation whilst keeping track of how many times validation method is called - * - * @param bool $caonly - * @param int $count - * @return mixed */ - private function validateSignatureCountable($caonly, $count) + private function validateSignatureCountable(bool $caonly, int $count): ?bool { if (!is_array($this->currentCert) || !isset($this->signatureSubject)) { return null; @@ -1370,15 +1340,9 @@ class X509 * Returns true if the signature is verified and false if it is not correct. * If the algorithms are unsupposed an exception is thrown. * - * @param string $publicKeyAlgorithm - * @param string $publicKey - * @param string $signatureAlgorithm - * @param string $signature - * @param string $signatureSubject - * @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported - * @return bool + *@throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported */ - private function validateSignatureHelper($publicKeyAlgorithm, $publicKey, $signatureAlgorithm, $signature, $signatureSubject) + private function validateSignatureHelper(string $publicKeyAlgorithm, string $publicKey, string $signatureAlgorithm, string $signature, string $signatureSubject): bool { switch ($publicKeyAlgorithm) { case 'id-RSASSA-PSS': @@ -1447,28 +1411,24 @@ class X509 * When validating a signature it may be necessary to download intermediate certs from URI's. * An intermediate cert that linked to itself would result in an infinite loop so to prevent * that we set a recursion limit. A negative number means that there is no recursion limit. - * - * @param int $count */ - public static function setRecurLimit($count) + public static function setRecurLimit(int $count): void { self::$recur_limit = $count; } /** * Prevents URIs from being automatically retrieved - * */ - public static function disableURLFetch() + public static function disableURLFetch(): void { self::$disable_url_fetch = true; } /** * Allows URIs to be automatically retrieved - * */ - public static function enableURLFetch() + public static function enableURLFetch(): void { self::$disable_url_fetch = false; } @@ -1477,11 +1437,8 @@ class X509 * Decodes an IP address * * Takes in a base64 encoded "blob" and returns a human readable IP address - * - * @param string $ip - * @return string */ - public static function decodeIP($ip) + public static function decodeIP(string $ip): string { return inet_ntop($ip); } @@ -1490,11 +1447,8 @@ class X509 * Decodes an IP address in a name constraints extension * * Takes in a base64 encoded "blob" and returns a human readable IP address / mask - * - * @param string $ip - * @return array */ - public static function decodeNameConstraintIP($ip) + public static function decodeNameConstraintIP(string $ip): array { $size = strlen($ip) >> 1; $mask = substr($ip, $size); @@ -1508,9 +1462,8 @@ class X509 * Takes a human readable IP address into a base64-encoded "blob" * * @param string|array $ip - * @return string */ - public static function encodeIP($ip) + public static function encodeIP($ip): string { return is_string($ip) ? inet_pton($ip) : @@ -1519,11 +1472,8 @@ class X509 /** * "Normalizes" a Distinguished Name property - * - * @param string $propName - * @return mixed */ - private function translateDNProp($propName) + private function translateDNProp(string $propName) { switch (strtolower($propName)) { case 'id-at-countryname': @@ -1611,12 +1561,9 @@ class X509 /** * Set a Distinguished Name property * - * @param string $propName - * @param mixed $propValue * @param string $type optional - * @return bool */ - public function setDNProp($propName, $propValue, $type = 'utf8String') + public function setDNProp(string $propName, $propValue, string $type = 'utf8String'): bool { if (empty($this->dn)) { $this->dn = ['rdnSequence' => []]; @@ -1643,10 +1590,8 @@ class X509 /** * Remove Distinguished Name properties - * - * @param string $propName */ - public function removeDNProp($propName) + public function removeDNProp(string $propName): void { if (empty($this->dn)) { return; @@ -1674,12 +1619,10 @@ class X509 /** * Get Distinguished Name properties * - * @param string $propName - * @param array $dn optional + * @param array|null $dn optional * @param bool $withType optional - * @return mixed */ - public function getDNProp($propName, $dn = null, $withType = false) + public function getDNProp(string $propName, array $dn = null, bool $withType = false) { if (!isset($dn)) { $dn = $this->dn; @@ -1735,12 +1678,10 @@ class X509 /** * Set a Distinguished Name * - * @param mixed $dn * @param bool $merge optional * @param string $type optional - * @return bool */ - public function setDN($dn, $merge = false, $type = 'utf8String') + public function setDN($dn, bool $merge = false, string $type = 'utf8String'): bool { if (!$merge) { $this->dn = null; @@ -1778,10 +1719,10 @@ class X509 * Get the Distinguished Name for a certificates subject * * @param mixed $format optional - * @param array $dn optional + * @param array|null $dn optional * @return array|bool|string */ - public function getDN($format = self::DN_ARRAY, $dn = null) + public function getDN($format = self::DN_ARRAY, array $dn = null) { if (!isset($dn)) { $dn = isset($this->currentCert['tbsCertList']) ? $this->currentCert['tbsCertList']['issuer'] : $this->dn; @@ -1920,9 +1861,8 @@ class X509 * Get the Distinguished Name for a certificate/crl issuer * * @param int $format optional - * @return mixed */ - public function getIssuerDN($format = self::DN_ARRAY) + public function getIssuerDN(int $format = self::DN_ARRAY) { switch (true) { case !isset($this->currentCert) || !is_array($this->currentCert): @@ -1941,9 +1881,8 @@ class X509 * Alias of getDN() * * @param int $format optional - * @return mixed */ - public function getSubjectDN($format = self::DN_ARRAY) + public function getSubjectDN(int $format = self::DN_ARRAY) { switch (true) { case !empty($this->dn): @@ -1962,11 +1901,9 @@ class X509 /** * Get an individual Distinguished Name property for a certificate/crl issuer * - * @param string $propName * @param bool $withType optional - * @return mixed */ - public function getIssuerDNProp($propName, $withType = false) + public function getIssuerDNProp(string $propName, bool $withType = false) { switch (true) { case !isset($this->currentCert) || !is_array($this->currentCert): @@ -1983,11 +1920,9 @@ class X509 /** * Get an individual Distinguished Name property for a certificate/csr subject * - * @param string $propName * @param bool $withType optional - * @return mixed */ - public function getSubjectDNProp($propName, $withType = false) + public function getSubjectDNProp(string $propName, bool $withType = false) { switch (true) { case !empty($this->dn): @@ -2005,8 +1940,6 @@ class X509 /** * Get the certificate chain for the current cert - * - * @return mixed */ public function getChain() { @@ -2061,11 +1994,8 @@ class X509 * Set public key * * Key needs to be a \phpseclib3\Crypt\RSA object - * - * @param PublicKey $key - * @return void */ - public function setPublicKey(PublicKey $key) + public function setPublicKey(PublicKey $key): void { $this->publicKey = $key; } @@ -2074,10 +2004,8 @@ class X509 * Set private key * * Key needs to be a \phpseclib3\Crypt\RSA object - * - * @param PrivateKey $key */ - public function setPrivateKey(PrivateKey $key) + public function setPrivateKey(PrivateKey $key): void { $this->privateKey = $key; } @@ -2086,10 +2014,8 @@ class X509 * Set challenge * * Used for SPKAC CSR's - * - * @param string $challenge */ - public function setChallenge($challenge) + public function setChallenge(string $challenge): void { $this->challenge = $challenge; } @@ -2098,8 +2024,6 @@ class X509 * Gets the public key * * Returns a \phpseclib3\Crypt\RSA object or a false. - * - * @return mixed */ public function getPublicKey() { @@ -2144,12 +2068,8 @@ class X509 /** * Load a Certificate Signing Request - * - * @param string $csr - * @param int $mode - * @return mixed */ - public function loadCSR($csr, $mode = self::FORMAT_AUTO_DETECT) + public function loadCSR(string $csr, int $mode = self::FORMAT_AUTO_DETECT) { if (is_array($csr) && isset($csr['certificationRequestInfo'])) { unset($this->currentCert); @@ -2219,11 +2139,10 @@ class X509 /** * Save CSR request * - * @param array $csr * @param int $format optional * @return string */ - public function saveCSR($csr, $format = self::FORMAT_PEM) + public function saveCSR(array $csr, int $format = self::FORMAT_PEM) { if (!is_array($csr) || !isset($csr['certificationRequestInfo'])) { return false; @@ -2264,11 +2183,8 @@ class X509 * SPKAC's are produced by the HTML5 keygen element: * * https://developer.mozilla.org/en-US/docs/HTML/Element/keygen - * - * @param string $spkac - * @return mixed */ - public function loadSPKAC($spkac) + public function loadSPKAC(string $spkac) { if (is_array($spkac) && isset($spkac['publicKeyAndChallenge'])) { unset($this->currentCert); @@ -2328,11 +2244,10 @@ class X509 /** * Save a SPKAC CSR request * - * @param array $spkac * @param int $format optional * @return string */ - public function saveSPKAC($spkac, $format = self::FORMAT_PEM) + public function saveSPKAC(array $spkac, int $format = self::FORMAT_PEM) { if (!is_array($spkac) || !isset($spkac['publicKeyAndChallenge'])) { return false; @@ -2364,12 +2279,8 @@ class X509 /** * Load a Certificate Revocation List - * - * @param string $crl - * @param int $mode - * @return mixed */ - public function loadCRL($crl, $mode = self::FORMAT_AUTO_DETECT) + public function loadCRL(string $crl, int $mode = self::FORMAT_AUTO_DETECT) { if (is_array($crl) && isset($crl['tbsCertList'])) { $this->currentCert = $crl; @@ -2431,11 +2342,10 @@ class X509 /** * Save Certificate Revocation List. * - * @param array $crl * @param int $format optional * @return string */ - public function saveCRL($crl, $format = self::FORMAT_PEM) + public function saveCRL(array $crl, int $format = self::FORMAT_PEM) { if (!is_array($crl) || !isset($crl['tbsCertList'])) { return false; @@ -2489,7 +2399,7 @@ class X509 * - 5.1.2.6 Revoked Certificates * by choosing utcTime iff year of date given is before 2050 and generalTime else. * - * @param string $date in format date('D, d M Y H:i:s O') + * @param Element|string $date in format date('D, d M Y H:i:s O') * @return array|Element */ private function timeField($date) @@ -2515,9 +2425,8 @@ class X509 * * @param \phpseclib3\File\X509 $issuer * @param \phpseclib3\File\X509 $subject - * @return mixed */ - public function sign($issuer, $subject) + public function sign(X509 $issuer, X509 $subject) { if (!is_object($issuer->privateKey) || empty($issuer->dn)) { return false; @@ -2527,8 +2436,8 @@ class X509 return false; } - $currentCert = isset($this->currentCert) ? $this->currentCert : null; - $signatureSubject = isset($this->signatureSubject) ? $this->signatureSubject : null; + $currentCert = $this->currentCert ?? null; + $signatureSubject = $this->signatureSubject ?? null; $signatureAlgorithm = self::identifySignatureAlgorithm($issuer->privateKey); if ($signatureAlgorithm != 'id-RSASSA-PSS') { $signatureAlgorithm = ['algorithm' => $signatureAlgorithm]; @@ -2706,8 +2615,6 @@ class X509 /** * Sign a CSR - * - * @return mixed */ public function signCSR() { @@ -2720,8 +2627,8 @@ class X509 $publicKey = $this->formatSubjectPublicKey(); $this->publicKey = $origPublicKey; - $currentCert = isset($this->currentCert) ? $this->currentCert : null; - $signatureSubject = isset($this->signatureSubject) ? $this->signatureSubject : null; + $currentCert = $this->currentCert ?? null; + $signatureSubject = $this->signatureSubject ?? null; $signatureAlgorithm = self::identifySignatureAlgorithm($this->privateKey); if (isset($this->currentCert) && is_array($this->currentCert) && isset($this->currentCert['certificationRequestInfo'])) { @@ -2760,8 +2667,6 @@ class X509 /** * Sign a SPKAC - * - * @return mixed */ public function signSPKAC() { @@ -2774,8 +2679,8 @@ class X509 $publicKey = $this->formatSubjectPublicKey(); $this->publicKey = $origPublicKey; - $currentCert = isset($this->currentCert) ? $this->currentCert : null; - $signatureSubject = isset($this->signatureSubject) ? $this->signatureSubject : null; + $currentCert = $this->currentCert ?? null; + $signatureSubject = $this->signatureSubject ?? null; $signatureAlgorithm = self::identifySignatureAlgorithm($this->privateKey); // re-signing a SPKAC seems silly but since everything else supports re-signing why not? @@ -2825,16 +2730,15 @@ class X509 * * @param \phpseclib3\File\X509 $issuer * @param \phpseclib3\File\X509 $crl - * @return mixed */ - public function signCRL($issuer, $crl) + public function signCRL(X509 $issuer, X509 $crl) { if (!is_object($issuer->privateKey) || empty($issuer->dn)) { return false; } - $currentCert = isset($this->currentCert) ? $this->currentCert : null; - $signatureSubject = isset($this->signatureSubject) ? $this->signatureSubject : null; + $currentCert = $this->currentCert ?? null; + $signatureSubject = $this->signatureSubject ?? null; $signatureAlgorithm = self::identifySignatureAlgorithm($issuer->privateKey); $thisUpdate = new \DateTimeImmutable('now', new \DateTimeZone(@date_default_timezone_get())); @@ -2884,7 +2788,7 @@ class X509 $this->removeExtension('id-ce-issuerAltName'); // Be sure version >= v2 if some extension found. - $version = isset($tbsCertList['version']) ? $tbsCertList['version'] : 0; + $version = $tbsCertList['version'] ?? 0; if (!$version) { if (!empty($tbsCertList['crlExtensions'])) { $version = 1; // v2. @@ -2954,11 +2858,9 @@ class X509 /** * Identify signature algorithm from key settings * - * @param PrivateKey $key * @throws \phpseclib3\Exception\UnsupportedAlgorithmException if the algorithm is unsupported - * @return string */ - private static function identifySignatureAlgorithm(PrivateKey $key) + private static function identifySignatureAlgorithm(PrivateKey $key): string { if ($key instanceof RSA) { if ($key->getPadding() & RSA::SIGNATURE_PSS) { @@ -2999,7 +2901,7 @@ class X509 case 'sha256': case 'sha384': case 'sha512': - return 'ecdsa-with-' . strtoupper($key->getHash()); + return 'ecdsa-with-' . strtoupper($key->getHash()->__toString()); } throw new UnsupportedAlgorithmException('The only supported hash algorithms for EC are: sha1, sha224, sha256, sha384, sha512'); } @@ -3012,7 +2914,7 @@ class X509 * * @param \DateTimeInterface|string $date */ - public function setStartDate($date) + public function setStartDate($date): void { if (!is_object($date) || !($date instanceof \DateTimeInterface)) { $date = new \DateTimeImmutable($date, new \DateTimeZone(@date_default_timezone_get())); @@ -3026,7 +2928,7 @@ class X509 * * @param \DateTimeInterface|string $date */ - public function setEndDate($date) + public function setEndDate($date): void { /* To indicate that a certificate has no well-defined expiration date, @@ -3051,19 +2953,17 @@ class X509 /** * Set Serial Number * - * @param string $serial * @param int $base optional */ - public function setSerialNumber($serial, $base = -256) + public function setSerialNumber(string $serial, int $base = -256): void { $this->serialNumber = new BigInteger($serial, $base); } /** * Turns the certificate into a certificate authority - * */ - public function makeCA() + public function makeCA(): void { $this->caFlag = true; } @@ -3075,11 +2975,9 @@ class X509 * implementing the checks included in _subArray() but without copying * a potentially large array by passing its reference by-value to is_array(). * - * @param array $root - * @param string $path * @return boolean */ - private function isSubArrayValid($root, $path) + private function isSubArrayValid(array $root, string $path): bool { if (!is_array($root)) { return false; @@ -3110,12 +3008,11 @@ class X509 * Passing a reference (i.e. $root) by-value (i.e. to is_array()) * creates a copy. If $root is an especially large array, this is expensive. * - * @param array $root * @param string $path absolute path with / as component separator * @param bool $create optional * @return array|false */ - private function &subArrayUnchecked(&$root, $path, $create = false) + private function &subArrayUnchecked(array &$root, string $path, bool $create = false) { $false = false; @@ -3137,12 +3034,11 @@ class X509 /** * Get a reference to a subarray * - * @param array $root * @param string $path absolute path with / as component separator * @param bool $create optional * @return array|false */ - private function &subArray(&$root, $path, $create = false) + private function &subArray(?array &$root, string $path, bool $create = false) { $false = false; @@ -3172,12 +3068,11 @@ class X509 /** * Get a reference to an extension subarray * - * @param array $root - * @param string $path optional absolute path with / as component separator + * @param string|null $path optional absolute path with / as component separator * @param bool $create optional * @return array|false */ - private function &extensions(&$root, $path = null, $create = false) + private function &extensions(?array &$root, string $path = null, bool $create = false) { if (!isset($root)) { $root = $this->currentCert; @@ -3226,11 +3121,9 @@ class X509 /** * Remove an Extension * - * @param string $id - * @param string $path optional - * @return bool + * @param string|null $path optional */ - private function removeExtensionHelper($id, $path = null) + private function removeExtensionHelper(string $id, string $path = null): bool { $extensions = &$this->extensions($this->currentCert, $path); @@ -3259,12 +3152,10 @@ class X509 * * Returns the extension if it exists and false if not * - * @param string $id - * @param array $cert optional - * @param string $path optional - * @return mixed + * @param array|null $cert optional + * @param string|null $path optional */ - private function getExtensionHelper($id, $cert = null, $path = null) + private function getExtensionHelper(string $id, array $cert = null, string $path = null) { $extensions = $this->extensions($cert, $path); @@ -3284,11 +3175,10 @@ class X509 /** * Returns a list of all extensions in use * - * @param array $cert optional - * @param string $path optional - * @return array + * @param array|null $cert optional + * @param string|null $path optional */ - private function getExtensionsHelper($cert = null, $path = null) + private function getExtensionsHelper(array $cert = null, string $path = null): array { $exts = $this->extensions($cert, $path); $extensions = []; @@ -3305,14 +3195,11 @@ class X509 /** * Set an Extension * - * @param string $id - * @param mixed $value * @param bool $critical optional * @param bool $replace optional - * @param string $path optional - * @return bool + * @param string|null $path optional */ - private function setExtensionHelper($id, $value, $critical = false, $replace = true, $path = null) + private function setExtensionHelper(string $id, $value, bool $critical = false, bool $replace = true, string $path = null): bool { $extensions = &$this->extensions($this->currentCert, $path, true); @@ -3339,11 +3226,8 @@ class X509 /** * Remove a certificate, CSR or CRL Extension - * - * @param string $id - * @return bool */ - public function removeExtension($id) + public function removeExtension(string $id): bool { return $this->removeExtensionHelper($id); } @@ -3353,12 +3237,9 @@ class X509 * * Returns the extension if it exists and false if not * - * @param string $id - * @param array $cert optional - * @param string $path - * @return mixed + * @param array|null $cert optional */ - public function getExtension($id, $cert = null, $path = null) + public function getExtension(string $id, array $cert = null, string $path = null) { return $this->getExtensionHelper($id, $cert, $path); } @@ -3366,11 +3247,10 @@ class X509 /** * Returns a list of all extensions in use in certificate, CSR or CRL * - * @param array $cert optional - * @param string $path optional - * @return array + * @param array|null $cert optional + * @param string|null $path optional */ - public function getExtensions($cert = null, $path = null) + public function getExtensions(array $cert = null, string $path = null): array { return $this->getExtensionsHelper($cert, $path); } @@ -3378,13 +3258,10 @@ class X509 /** * Set a certificate, CSR or CRL Extension * - * @param string $id - * @param mixed $value * @param bool $critical optional * @param bool $replace optional - * @return bool */ - public function setExtension($id, $value, $critical = false, $replace = true) + public function setExtension(string $id, $value, bool $critical = false, bool $replace = true): bool { return $this->setExtensionHelper($id, $value, $critical, $replace); } @@ -3392,11 +3269,9 @@ class X509 /** * Remove a CSR attribute. * - * @param string $id * @param int $disposition optional - * @return bool */ - public function removeAttribute($id, $disposition = self::ATTR_ALL) + public function removeAttribute(string $id, int $disposition = self::ATTR_ALL): bool { $attributes = &$this->subArray($this->currentCert, 'certificationRequestInfo/attributes'); @@ -3441,12 +3316,10 @@ class X509 * * Returns the attribute if it exists and false if not * - * @param string $id * @param int $disposition optional - * @param array $csr optional - * @return mixed + * @param array|null $csr optional */ - public function getAttribute($id, $disposition = self::ATTR_ALL, $csr = null) + public function getAttribute(string $id, int $disposition = self::ATTR_ALL, array $csr = null) { if (empty($csr)) { $csr = $this->currentCert; @@ -3482,10 +3355,9 @@ class X509 /** * Returns a list of all CSR attributes in use * - * @param array $csr optional - * @return array + * @param array|null $csr optional */ - public function getAttributes($csr = null) + public function getAttributes(array $csr = null): array { if (empty($csr)) { $csr = $this->currentCert; @@ -3506,12 +3378,9 @@ class X509 /** * Set a CSR attribute * - * @param string $id - * @param mixed $value * @param int $disposition optional - * @return bool */ - public function setAttribute($id, $value, $disposition = self::ATTR_ALL) + public function setAttribute(string $id, $value, int $disposition = self::ATTR_ALL): bool { $attributes = &$this->subArray($this->currentCert, 'certificationRequestInfo/attributes', true); @@ -3563,10 +3432,8 @@ class X509 * Sets the subject key identifier * * This is used by the id-ce-authorityKeyIdentifier and the id-ce-subjectKeyIdentifier extensions. - * - * @param string $value */ - public function setKeyIdentifier($value) + public function setKeyIdentifier(string $value): void { if (empty($value)) { unset($this->currentKeyIdentifier); @@ -3592,7 +3459,7 @@ class X509 * @param int $method optional * @return string binary key identifier */ - public function computeKeyIdentifier($key = null, $method = 1) + public function computeKeyIdentifier($key = null, int $method = 1) { if (is_null($key)) { $key = $this; @@ -3641,7 +3508,7 @@ class X509 } // If in PEM format, convert to binary. - $key = ASN1::extractBER($key); + $key = ASN1::extractBER(is_string($key) ? $key : $key->__toString()); // Now we have the key string: compute its sha-1 sum. $hash = new Hash('sha1'); @@ -3681,11 +3548,8 @@ class X509 /** * Set the domain name's which the cert is to be valid for - * - * @param mixed ...$domains - * @return void */ - public function setDomain(...$domains) + public function setDomain(...$domains): void { $this->domains = $domains; $this->removeDNProp('id-at-commonName'); @@ -3697,7 +3561,7 @@ class X509 * * @param mixed[] ...$ipAddresses */ - public function setIPAddress(...$ipAddresses) + public function setIPAddress(...$ipAddresses): void { $this->ipAddresses = $ipAddresses; /* @@ -3710,11 +3574,8 @@ class X509 /** * Helper function to build domain array - * - * @param string $domain - * @return array */ - private static function dnsName($domain) + private static function dnsName(string $domain): array { return ['dNSName' => $domain]; } @@ -3723,11 +3584,8 @@ class X509 * Helper function to build IP Address array * * (IPv6 is not currently supported) - * - * @param string $address - * @return array */ - private function iPAddress($address) + private function iPAddress(string $address): array { return ['iPAddress' => $address]; } @@ -3735,12 +3593,10 @@ class X509 /** * Get the index of a revoked certificate. * - * @param array $rclist - * @param string $serial * @param bool $create optional * @return int|false */ - private function revokedCertificate(&$rclist, $serial, $create = false) + private function revokedCertificate(array &$rclist, string $serial, bool $create = false) { $serial = new BigInteger($serial); @@ -3764,11 +3620,9 @@ class X509 /** * Revoke a certificate. * - * @param string $serial - * @param string $date optional - * @return bool + * @param string|null $date optional */ - public function revoke($serial, $date = null) + public function revoke(string $serial, string $date = null): bool { if (isset($this->currentCert['tbsCertList'])) { if (is_array($rclist = &$this->subArray($this->currentCert, 'tbsCertList/revokedCertificates', true))) { @@ -3789,11 +3643,8 @@ class X509 /** * Unrevoke a certificate. - * - * @param string $serial - * @return bool */ - public function unrevoke($serial) + public function unrevoke(string $serial): bool { if (is_array($rclist = &$this->subArray($this->currentCert, 'tbsCertList/revokedCertificates'))) { if (($i = $this->revokedCertificate($rclist, $serial)) !== false) { @@ -3808,11 +3659,8 @@ class X509 /** * Get a revoked certificate. - * - * @param string $serial - * @return mixed */ - public function getRevoked($serial) + public function getRevoked(string $serial) { if (is_array($rclist = $this->subArray($this->currentCert, 'tbsCertList/revokedCertificates'))) { if (($i = $this->revokedCertificate($rclist, $serial)) !== false) { @@ -3826,10 +3674,10 @@ class X509 /** * List revoked certificates * - * @param array $crl optional + * @param array|null $crl optional * @return array|bool */ - public function listRevoked($crl = null) + public function listRevoked(array $crl = null) { if (!isset($crl)) { $crl = $this->currentCert; @@ -3852,12 +3700,8 @@ class X509 /** * Remove a Revoked Certificate Extension - * - * @param string $serial - * @param string $id - * @return bool */ - public function removeRevokedCertificateExtension($serial, $id) + public function removeRevokedCertificateExtension(string $serial, string $id): bool { if (is_array($rclist = &$this->subArray($this->currentCert, 'tbsCertList/revokedCertificates'))) { if (($i = $this->revokedCertificate($rclist, $serial)) !== false) { @@ -3873,12 +3717,9 @@ class X509 * * Returns the extension if it exists and false if not * - * @param string $serial - * @param string $id - * @param array $crl optional - * @return mixed + * @param array|null $crl optional */ - public function getRevokedCertificateExtension($serial, $id, $crl = null) + public function getRevokedCertificateExtension(string $serial, string $id, array $crl = null) { if (!isset($crl)) { $crl = $this->currentCert; @@ -3896,11 +3737,10 @@ class X509 /** * Returns a list of all extensions in use for a given revoked certificate * - * @param string $serial - * @param array $crl optional + * @param array|null $crl optional * @return array|bool */ - public function getRevokedCertificateExtensions($serial, $crl = null) + public function getRevokedCertificateExtensions(string $serial, array $crl = null) { if (!isset($crl)) { $crl = $this->currentCert; @@ -3918,14 +3758,10 @@ class X509 /** * Set a Revoked Certificate Extension * - * @param string $serial - * @param string $id - * @param mixed $value * @param bool $critical optional * @param bool $replace optional - * @return bool */ - public function setRevokedCertificateExtension($serial, $id, $value, $critical = false, $replace = true) + public function setRevokedCertificateExtension(string $serial, string $id, $value, bool $critical = false, bool $replace = true): bool { if (isset($this->currentCert['tbsCertList'])) { if (is_array($rclist = &$this->subArray($this->currentCert, 'tbsCertList/revokedCertificates', true))) { @@ -3940,11 +3776,8 @@ class X509 /** * Register the mapping for a custom/unsupported extension. - * - * @param string $id - * @param array $mapping */ - public static function registerExtension($id, array $mapping) + public static function registerExtension(string $id, array $mapping): void { if (isset(self::$extensions[$id]) && self::$extensions[$id] !== $mapping) { throw new \RuntimeException( @@ -3957,25 +3790,16 @@ class X509 /** * Register the mapping for a custom/unsupported extension. - * - * @param string $id - * - * @return array|null */ - public static function getRegisteredExtension($id) + public static function getRegisteredExtension(string $id): ?array { - return isset(self::$extensions[$id]) ? self::$extensions[$id] : null; + return self::$extensions[$id] ?? null; } /** * Register the mapping for a custom/unsupported extension. - * - * @param string $id - * @param mixed $value - * @param bool $critical - * @param bool $replace */ - public function setExtensionValue($id, $value, $critical = false, $replace = false) + public function setExtensionValue(string $id, $value, bool $critical = false, bool $replace = false): void { $this->extensionValues[$id] = compact('critical', 'replace', 'value'); } diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index b3ab84a8..88860838 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -25,6 +25,8 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ +declare(strict_types=1); + namespace phpseclib3\Math; use phpseclib3\Exception\BadConfigurationException; @@ -82,11 +84,9 @@ class BigInteger implements \JsonSerializable * * Throws an exception if the type is invalid * - * @param string $main * @param list