[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/sodium_compat/src/ -> File.php (summary)

(no description)

File Size: 1547 lines (53 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ParagonIE_Sodium_File:: (21 methods):
  box()
  box_open()
  box_seal()
  box_seal_open()
  generichash()
  secretbox()
  secretbox_open()
  sign()
  verify()
  box_encrypt()
  box_decrypt()
  secretbox_encrypt()
  secretbox_decrypt()
  onetimeauth_verify()
  updateHashWithFile()
  sign_core32()
  verify_core32()
  secretbox_encrypt_core32()
  secretbox_decrypt_core32()
  onetimeauth_verify_core32()
  ftell()


Class: ParagonIE_Sodium_File  - X-Ref

Class ParagonIE_Sodium_File

box($inputFile, $outputFile, $nonce, $keyPair)   X-Ref
Box a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_box(), but produces
the same result.

return: bool
param: string $inputFile  Absolute path to a file on the filesystem
param: string $outputFile Absolute path to a file on the filesystem
param: string $nonce      Number to be used only once
param: string $keyPair    ECDH secret key and ECDH public key concatenated

box_open($inputFile, $outputFile, $nonce, $keypair)   X-Ref
Open a boxed file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_box_open(), but produces
the same result.

Warning: Does not protect against TOCTOU attacks. You should
just load the file into memory and use crypto_box_open() if
you are worried about those.

return: bool
param: string $inputFile
param: string $outputFile
param: string $nonce
param: string $keypair

box_seal($inputFile, $outputFile, $publicKey)   X-Ref
Seal a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_box_seal(), but produces
the same result.

return: bool
param: string $inputFile  Absolute path to a file on the filesystem
param: string $outputFile Absolute path to a file on the filesystem
param: string $publicKey  ECDH public key

box_seal_open($inputFile, $outputFile, $ecdhKeypair)   X-Ref
Open a sealed file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_box_seal_open(), but produces
the same result.

Warning: Does not protect against TOCTOU attacks. You should
just load the file into memory and use crypto_box_seal_open() if
you are worried about those.

return: bool
param: string $inputFile
param: string $outputFile
param: string $ecdhKeypair

generichash($filePath, $key = '', $outputLength = 32)   X-Ref
Calculate the BLAKE2b hash of a file.

return: string                   BLAKE2b hash
param: string      $filePath     Absolute path to a file on the filesystem
param: string|null $key          BLAKE2b key
param: int         $outputLength Length of hash output

secretbox($inputFile, $outputFile, $nonce, $key)   X-Ref
Encrypt a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_secretbox(), but produces
the same result.

return: bool
param: string $inputFile  Absolute path to a file on the filesystem
param: string $outputFile Absolute path to a file on the filesystem
param: string $nonce      Number to be used only once
param: string $key        Encryption key

secretbox_open($inputFile, $outputFile, $nonce, $key)   X-Ref
Seal a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_secretbox_open(), but produces
the same result.

Warning: Does not protect against TOCTOU attacks. You should
just load the file into memory and use crypto_secretbox_open() if
you are worried about those.

return: bool
param: string $inputFile
param: string $outputFile
param: string $nonce
param: string $key

sign($filePath, $secretKey)   X-Ref
Sign a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_sign_detached(), but produces
the same result.

return: string           Ed25519 signature
param: string $filePath  Absolute path to a file on the filesystem
param: string $secretKey Secret signing key

verify($sig, $filePath, $publicKey)   X-Ref
Verify a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_sign_verify_detached(), but
produces the same result.

return: bool
param: string $sig       Ed25519 signature
param: string $filePath  Absolute path to a file on the filesystem
param: string $publicKey Signing public key

box_encrypt($ifp, $ofp, $mlen, $nonce, $boxKeypair)   X-Ref

return: bool
param: resource $ifp
param: resource $ofp
param: int      $mlen
param: string   $nonce
param: string   $boxKeypair

box_decrypt($ifp, $ofp, $mlen, $nonce, $boxKeypair)   X-Ref

return: bool
param: resource $ifp
param: resource $ofp
param: int      $mlen
param: string   $nonce
param: string   $boxKeypair

secretbox_encrypt($ifp, $ofp, $mlen, $nonce, $key)   X-Ref
Encrypt a file

return: bool
param: resource $ifp
param: resource $ofp
param: int $mlen
param: string $nonce
param: string $key

secretbox_decrypt($ifp, $ofp, $mlen, $nonce, $key)   X-Ref
Decrypt a file

return: bool
param: resource $ifp
param: resource $ofp
param: int $mlen
param: string $nonce
param: string $key

onetimeauth_verify(ParagonIE_Sodium_Core_Poly1305_State $state,$ifp,$tag = '',$mlen = 0)   X-Ref

return: bool
param: ParagonIE_Sodium_Core_Poly1305_State $state
param: resource $ifp
param: string $tag
param: int $mlen

updateHashWithFile($hash, $fp, $size = 0)   X-Ref
Update a hash context with the contents of a file, without
loading the entire file into memory.

return: resource|object Resource on PHP < 7.2, HashContext object on PHP >= 7.2
param: resource|HashContext $hash
param: resource $fp
param: int $size

sign_core32($filePath, $secretKey)   X-Ref
Sign a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_sign_detached(), but produces
the same result. (32-bit)

return: string           Ed25519 signature
param: string $filePath  Absolute path to a file on the filesystem
param: string $secretKey Secret signing key

verify_core32($sig, $filePath, $publicKey)   X-Ref
Verify a file (rather than a string). Uses less memory than
ParagonIE_Sodium_Compat::crypto_sign_verify_detached(), but
produces the same result. (32-bit)

return: bool
param: string $sig       Ed25519 signature
param: string $filePath  Absolute path to a file on the filesystem
param: string $publicKey Signing public key

secretbox_encrypt_core32($ifp, $ofp, $mlen, $nonce, $key)   X-Ref
Encrypt a file (32-bit)

return: bool
param: resource $ifp
param: resource $ofp
param: int $mlen
param: string $nonce
param: string $key

secretbox_decrypt_core32($ifp, $ofp, $mlen, $nonce, $key)   X-Ref
Decrypt a file (32-bit)

return: bool
param: resource $ifp
param: resource $ofp
param: int $mlen
param: string $nonce
param: string $key

onetimeauth_verify_core32(ParagonIE_Sodium_Core32_Poly1305_State $state,$ifp,$tag = '',$mlen = 0)   X-Ref
One-time message authentication for 32-bit systems

return: bool
param: ParagonIE_Sodium_Core32_Poly1305_State $state
param: resource $ifp
param: string $tag
param: int $mlen

ftell($resource)   X-Ref

return: int
param: resource $resource



Generated: Tue Mar 19 01:00:02 2024 Cross-referenced by PHPXref 0.7.1