PHP 클래스 ParagonIE\GPGMailer\GPGMailer

파일 보기 프로젝트 열기: paragonie/gpg-mailer 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$mailer TransportInterface
$options array
$serverKeyFingerprint string

공개 메소드들

메소드 설명
__construct ( TransportInterface $transport, array $options = [], string $serverKey = '' ) GPGMailer constructor.
decrypt ( Message $message ) : Message Encrypt the body of an email.
encrypt ( Message $message, string $fingerprint ) : Message Encrypt the body of an email.
encryptAndSign ( Message $message, string $fingerprint ) : Message Encrypt and sign the body of an email.
export ( string $fingerprint ) : string Get the public key corresponding to a fingerprint.
getTransport ( ) : TransportInterface Return the stored Transport.
import ( string $gpgKey ) : string Import a public key, return the fingerprint
send ( Message $message, string $fingerprint ) Encrypt then email a message
sendUnencrypted ( Message $message, boolean $force = false ) Email a message without encrypting it.
setPrivateKey ( string $serverKey ) : self Sets the private key for signing.
sign ( Message $message ) : Message Sign a message (but don't encrypt)
verify ( Message $message, string $fingerprint ) : boolean Verify a message

메소드 상세

__construct() 공개 메소드

GPGMailer constructor.
public __construct ( TransportInterface $transport, array $options = [], string $serverKey = '' )
$transport TransportInterface
$options array For Crypt_GPG
$serverKey string

decrypt() 공개 메소드

Encrypt the body of an email.
public decrypt ( Message $message ) : Message
$message Message
리턴 Message

encrypt() 공개 메소드

Encrypt the body of an email.
public encrypt ( Message $message, string $fingerprint ) : Message
$message Message
$fingerprint string
리턴 Message

encryptAndSign() 공개 메소드

Encrypt and sign the body of an email.
public encryptAndSign ( Message $message, string $fingerprint ) : Message
$message Message
$fingerprint string
리턴 Message

export() 공개 메소드

Get the public key corresponding to a fingerprint.
public export ( string $fingerprint ) : string
$fingerprint string
리턴 string

getTransport() 공개 메소드

Return the stored Transport.
public getTransport ( ) : TransportInterface
리턴 TransportInterface

import() 공개 메소드

Import a public key, return the fingerprint
public import ( string $gpgKey ) : string
$gpgKey string An ASCII armored public key
리턴 string The GPG fingerprint for this key

send() 공개 메소드

Encrypt then email a message
public send ( Message $message, string $fingerprint )
$message Message The message data
$fingerprint string Which public key fingerprint to use

sendUnencrypted() 공개 메소드

Email a message without encrypting it.
public sendUnencrypted ( Message $message, boolean $force = false )
$message Message The message data
$force boolean Send even if we don't have a private key?

setPrivateKey() 공개 메소드

Sets the private key for signing.
public setPrivateKey ( string $serverKey ) : self
$serverKey string
리턴 self

sign() 공개 메소드

Sign a message (but don't encrypt)
public sign ( Message $message ) : Message
$message Message
리턴 Message

verify() 공개 메소드

Verify a message
public verify ( Message $message, string $fingerprint ) : boolean
$message Message
$fingerprint string
리턴 boolean

프로퍼티 상세

$mailer 보호되어 있는 프로퍼티

protected TransportInterface $mailer
리턴 TransportInterface

$options 보호되어 있는 프로퍼티

protected array $options
리턴 array

$serverKeyFingerprint 보호되어 있는 프로퍼티

protected string $serverKeyFingerprint
리턴 string