Class: AppInfo::Android::Signature::V1

Inherits:
Base
  • Object
show all
Defined in:
lib/app_info/android/signatures/v1.rb

Overview

Android v1 Signature

Constant Summary collapse

DESCRIPTION =
'JAR signing'
PKCS7_HEADER =
[0x30, 0x82].freeze

Instance Attribute Summary collapse

Attributes inherited from Base

#verified

Instance Method Summary collapse

Methods inherited from Base

#initialize, #logger, #scheme, verify

Constructor Details

This class inherits a constructor from AppInfo::Android::Signature::Base

Instance Attribute Details

#certificatesObject (readonly)

Returns the value of attribute certificates.



12
13
14
# File 'lib/app_info/android/signatures/v1.rb', line 12

def certificates
  @certificates
end

#signaturesObject (readonly)

Returns the value of attribute signatures.



12
13
14
# File 'lib/app_info/android/signatures/v1.rb', line 12

def signatures
  @signatures
end

Instance Method Details

#descriptionObject



18
19
20
# File 'lib/app_info/android/signatures/v1.rb', line 18

def description
  DESCRIPTION
end

#verifyObject

Raises:



22
23
24
25
26
27
# File 'lib/app_info/android/signatures/v1.rb', line 22

def verify
  @signatures = fetch_signatures
  @certificates = fetch_certificates

  raise NotFoundError, 'Not found certificates' if @certificates.empty?
end

#versionObject



14
15
16
# File 'lib/app_info/android/signatures/v1.rb', line 14

def version
  Version::V1
end