Class: atkOpenSSLEncryption
Source Location: /security/encryption/class.atkopensslencryption.inc
Class atkOpenSSLEncryption
Method Summary
| atkOpenSSLEncryption |
atkOpenSSLEncryption() |
The constructor of this class makes two configurations which are used by other functions |
| string |
addbackslashes() |
Change every backslashreplacestring in a backslash |
| string |
copyPrivateKey() |
This function copies a private key with a new password |
| mixed |
decrypt() |
The decryption method for decrypting data with the bajus algorithm |
| mixed |
encrypt() |
The encryption method for encrypting data with the openssl algorithm |
| array |
getKeys() |
This is a help function to get the private and the public key from one string in an array |
| array |
getNewKeys() |
This function makes a public key, a private key and a certificate from a single key |
| string |
getRandomKey() |
Creates a random key for tableencryption |
| string |
putKeys() |
This help function make one string from an array with private an public key in it |
Methods
atkOpenSSLEncryption atkOpenSSLEncryption(
)
|
|
The constructor of this class makes two configurations which are used by other functions
string addbackslashes(
string
$value
)
|
|
Change every backslashreplacestring in a backslash
Parameters:
|
string |
$value: |
The original string |
API Tags:
| Return: | The original string, with for every backslashreplacestring a backslash |
Redefinition of:
- atkEncryption::addbackslashes()
- For use of strimslashes function This implementation does nothing
string copyPrivateKey(
string
$key, string
$privkeypass, string
$newprivkeypass
)
|
|
This function copies a private key with a new password
Parameters:
|
string |
$key: |
The private key which must be copied |
|
string |
$privkeypass: |
The passphrase of the key |
|
string |
$newprivkeypass: |
The passphrase of the new key |
API Tags:
mixed decrypt(
mixed
$input, mixed
$key
)
|
|
The decryption method for decrypting data with the bajus algorithm
Parameters:
|
mixed |
$input: |
the data we want to encrypt |
|
mixed |
$key: |
the key we want to encrypt the data with |
API Tags:
| Return: | the encrypted data |
Redefinition of:
- atkEncryption::decrypt()
- Decryptionmethod, decrypts your input with a key
string decryptKey(
string
$key, string
$pass
)
|
|
Decryptionmethod for a key.
This implementation get the private key with a password and export it without password
Parameters:
|
string |
$key: |
The encrypted key |
|
string |
$pass: |
The password to decrypt de key |
API Tags:
| Return: | The decrypted key |
Redefinition of:
- atkEncryption::decryptKey()
- Decryptionmethod for a key. This implementation returns simple the input
mixed encrypt(
mixed
$input, mixed
$key
)
|
|
The encryption method for encrypting data with the openssl algorithm
Parameters:
|
mixed |
$input: |
the data we want to encrypt |
|
mixed |
$key: |
the key we want to encrypt the data with |
API Tags:
| Return: | the encrypted data |
Redefinition of:
- atkEncryption::encrypt()
- Encryptionmethod, encrypts your input with a key
string encryptKey(
string
$key, string
$pass
)
|
|
Encryptionmethod for a key.
This implementation get the private key without a password and export is with a password
Parameters:
|
string |
$key: |
The decrypted key |
|
string |
$pass: |
The password to encrypt de key |
API Tags:
| Return: | The encrypted key |
Redefinition of:
- atkEncryption::encryptKey()
- Encryptionmethod for a key. This implementation returns simple the input
array getKeys(
string
$key
)
|
|
This is a help function to get the private and the public key from one string in an array
Parameters:
|
string |
$key: |
The string containing the private, and the public key |
API Tags:
| Return: | The privatekey (private) and the public key (public) |
array getNewKeys(
string
$privkeypass
)
|
|
This function makes a public key, a private key and a certificate from a single key
Parameters:
|
string |
$privkeypass: |
a key on which the information is based |
API Tags:
| Return: | an array with 'private' and 'public' keys |
string getRandomKey(
string
$pass
)
|
|
Creates a random key for tableencryption
This implentation of this function returns a public and private key pair together in one string
Parameters:
|
string |
$pass: |
This implementation does nothing with this param |
API Tags:
Redefinition of:
- atkEncryption::getRandomKey()
- Creates a random key for tableencryption
string putKeys(
array
$keys
)
|
|
This help function make one string from an array with private an public key in it
Parameters:
|
array |
$keys: |
The private and public keys in one array |
API Tags:
| Return: | The private and public keys in one string |
string stripbackslashes(
string
$value
)
|
|
Change every backslash in the backslashreplacestring
Parameters:
|
string |
$value: |
The original string |
API Tags:
| Return: | The original string, with for every backslash the backslashreplacestring |
Redefinition of:
- atkEncryption::stripbackslashes()
- For use of strimslashes function This implementation does nothing