RSA

Wrappers for OpenSSL / RSA features

Class Methods

The following methods can be invoked on instances of this class.

decrypt(mixed strEncryptedData, string strPrivateKey)

Decrypts en encrypted string with an RSA private key

encrypt(mixed strData, string strPublicKey)

Encrypts a string with an RSA public key

generateRandomBytes(mixed iLength, mixed bToBase64)

Generates a random sequence of bytes

generateKeyPair(int iKeyLength)

Generates a key pair

getPublicKey(string strPrivateKey)

Derives the public key from a private key

sign(mixed strPrivateKey, string strMessage)

Signs a specific message

verify(mixed strMessage, mixed strSignature, mixed strPublicKey)

Verifies a signed message

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class