Class: IABConsentString::Consent::VendorConsentEncoder
- Inherits:
-
Object
- Object
- IABConsentString::Consent::VendorConsentEncoder
- Defined in:
- lib/iab_consent_string/consent/vendor_consent_encoder.rb
Class Method Summary collapse
-
.toBase64String(vendorConsent) ⇒ String
Encode vendor consent to Base64 string.
Class Method Details
.toBase64String(vendorConsent) ⇒ String
Encode vendor consent to Base64 string
9 10 11 12 |
# File 'lib/iab_consent_string/consent/vendor_consent_encoder.rb', line 9 def self.toBase64String(vendorConsent) # Encode Without Padding to respect IAB Consent String Spec Base64.urlsafe_encode64(vendorConsent.toByteArray().pack("C*") , padding: false) end |