The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
crypto.php File Reference

Functions

 rsa_sign ($data, $key, $alg= 'sha256')
 
 rsa_verify ($data, $sig, $key, $alg= 'sha256')
 
 pkcs5_pad ($text, $blocksize)
 
 pkcs5_unpad ($text)
 
 AES256CBC_encrypt ($data, $key, $iv)
 
 AES256CBC_decrypt ($data, $key, $iv)
 
 crypto_encapsulate ($data, $pubkey, $alg='aes256cbc')
 
 aes_encapsulate ($data, $pubkey)
 
 crypto_unencapsulate ($data, $prvkey)
 
 aes_unencapsulate ($data, $prvkey)
 
 new_keypair ($bits)
 
 pkcs1to8 ($oldkey, $len)
 
 pkcs8to1 ($oldkey, $len)
 

Function Documentation

AES256CBC_decrypt (   $data,
  $key,
  $iv 
)

Referenced by aes_unencapsulate().

AES256CBC_encrypt (   $data,
  $key,
  $iv 
)

Referenced by aes_encapsulate().

aes_encapsulate (   $data,
  $pubkey 
)
aes_unencapsulate (   $data,
  $prvkey 
)

Referenced by crypto_unencapsulate().

crypto_encapsulate (   $data,
  $pubkey,
  $alg = 'aes256cbc' 
)
new_keypair (   $bits)
pkcs1to8 (   $oldkey,
  $len 
)
pkcs5_pad (   $text,
  $blocksize 
)
pkcs5_unpad (   $text)
pkcs8to1 (   $oldkey,
  $len 
)