예제 #1
0
 private static function sign_auth_key($auth_key)
 {
     if (self::is_production()) {
         return AppIdentityService::signForApp($auth_key);
     } else {
         // In the development server we are not concerned with trying to generate
         // a secure signature.
         return ['key_name' => 'development_hash', 'signature' => sha1($auth_key)];
     }
 }
예제 #2
0
 public function testInvalidBytesToSign()
 {
     $this->setExpectedException('\\InvalidArgumentException');
     $sign_result = AppIdentityService::signForApp(1.0);
 }