QCloudAuthentationCreator Class Reference

Inherits from NSObject
Declared in QCloudAuthentationCreator.h

Overview

签名创建器。通过一个密钥将创建一个网络请求的签名。

示例

@code

 QCloudCredential* credential = [QCloudCredential new];
 credential.secretID  = @"secretID";
 credential.secretKey = @"secretKey";
 QCloudAuthentationV5Creator* creator = [[QCloudAuthentationV5Creator alloc] initWithCredential:credential];
 QCloudSignature* signature =  [creator signatureForData:urlRequst];

  credential

密钥

@property (nonatomic, strong, readonly, nonnull) QCloudCredential *credential

Declared In

QCloudAuthentationCreator.h

– initWithCredential:

初始化签名创建器。

- (instancetype)initWithCredential:(QCloudCredential *)credential

Parameters

credential

密钥

Return Value

签名创建器

Declared In

QCloudAuthentationCreator.h

– signatureForData:

创建一个网络请求的签名。

- (QCloudSignature *)signatureForData:(id)signData

Parameters

signData

将要签名的网络请求(类型不固定)

Return Value

一个合法的签名

Declared In

QCloudAuthentationCreator.h