src/Ses/SesClient.php
public static function generateSmtpPassword(CredentialsInterface $creds)
    {
        static $version = "\x02";
        static $algo = 'sha256';
        static $message = 'SendRawEmail';
        $signature = hash_hmac($algo, $message, $creds->getSecretKey(), true);

        return base64_encode($version . $signature);
    }
public static function generateSmtpPassword(CredentialsInterface $creds)
    {
        static $version = "\x02";
        static $algo = 'sha256';
        static $message = 'SendRawEmail';
        $signature = hash_hmac($algo, $message, $creds->getSecretKey(), true);

        return base64_encode($version . $signature);
    }
public static function generateSmtpPassword ( CredentialsInterface $ creds ) { static $ version = "\x02" ; static $ algo = 'sha256' ; static $ message = 'SendRawEmail' ; $ signature = hash_hmac ( $ algo , $ message , $ creds -> getSecretKey ( ) , true ) ; return base64_encode ( $ version . $ signature ) ; }
Create an SMTP password for a given IAM user's credentials.

The SMTP username is the Access Key ID for the provided credentials.

@link http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html#smtp-credentials-convert

@param CredentialsInterface $creds

@return string
Create an SMTP password for a given IAM user s credentials .