Метод |
Описание |
|
decrypt ( string $ciphertext, EncryptionSecretKey $ourPrivateKey, EncryptionPublicKey $theirPublicKey, mixed $encoding = Halite::ENCODE_BASE64URLSAFE ) : HiddenString |
Decrypt a string using asymmetric cryptography
Wraps SymmetricCrypto::decrypt() |
|
encrypt ( HiddenString $plaintext, EncryptionSecretKey $ourPrivateKey, EncryptionPublicKey $theirPublicKey, mixed $encoding = Halite::ENCODE_BASE64URLSAFE ) : string |
Encrypt a string using asymmetric cryptography
Wraps SymmetricCrypto::encrypt() |
|
getSharedSecret ( EncryptionSecretKey $privateKey, EncryptionPublicKey $publicKey, boolean $get_as_object = false ) : HiddenString | Key |
Diffie-Hellman, ECDHE, etc. |
|
seal ( HiddenString $plaintext, EncryptionPublicKey $publicKey, mixed $encoding = Halite::ENCODE_BASE64URLSAFE ) : string |
Encrypt a message with a target users' public key |
|
sign ( string $message, SignatureSecretKey $privateKey, mixed $encoding = Halite::ENCODE_BASE64URLSAFE ) : string |
Sign a message with our private key |
|
unseal ( string $ciphertext, EncryptionSecretKey $privateKey, mixed $encoding = Halite::ENCODE_BASE64URLSAFE ) : HiddenString |
Decrypt a sealed message with our private key |
|
verify ( string $message, SignaturePublicKey $publicKey, string $signature, mixed $encoding = Halite::ENCODE_BASE64URLSAFE ) : boolean |
Verify a signed message with the correct public key |
|