module AliMNS { export class Account { constructor ( accountId , keyId , keySecret ) { this . _accountId = accountId ; this . _keyId = keyId ; this . _keySecret = keySecret ; } public getAccountId ( ) { return this . _accountId ; } public getOwnerId ( ) { return this . _accountId ; } public getKeyId ( ) { return this . _keyId ; } public getGA ( ) { return this . _bGoogleAnalytics ; } public setGA ( bGA ) { this . _bGoogleAnalytics = bGA ; } public getHttps ( ) { return this . _bHttps ; } public setHttps ( bHttps ) { this . _bHttps = bHttps ; } public hmac_sha1 ( text , encoding ? ) { var hmacSHA1 = CryptoA . createHmac ( "sha1" , this . _keySecret ) ; return hmacSHA1 . update ( text ) . digest ( encoding ) ; } public b64md5 ( text ) { var cryptoMD5 = CryptoA . createHash ( "md5" ) ; return cryptoMD5 . update ( new Buffer ( text , 'utf-8' ) ) . digest ( "base64" ) ; } private _accountId : string ; private _keyId : string ; private _keySecret : string ; private _bGoogleAnalytics = true ; private _bHttps = false ; } }