mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-30 06:14:25 +02:00
implement basic structure of APK signature block
This commit is contained in:
parent
32a82f9527
commit
128d1fe283
@ -15,26 +15,23 @@
|
||||
*/
|
||||
package com.reandroid.archive2.block;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import com.reandroid.arsc.container.ExpandableBlockContainer;
|
||||
|
||||
public class LongBlock extends ZipBlock{
|
||||
public LongBlock() {
|
||||
super(8);
|
||||
public class SignatureScheme extends ExpandableBlockContainer {
|
||||
private final SignatureId signatureId;
|
||||
public SignatureScheme(int childesCount, SignatureId signatureId){
|
||||
super(childesCount);
|
||||
this.signatureId = signatureId;
|
||||
}
|
||||
@Override
|
||||
public int readBytes(InputStream inputStream) throws IOException {
|
||||
byte[] bytes = getBytesInternal();
|
||||
return inputStream.read(bytes, 0, bytes.length);
|
||||
public SignatureId getSignatureId() {
|
||||
return signatureId;
|
||||
}
|
||||
public long get(){
|
||||
return getLong(0);
|
||||
}
|
||||
public void set(long value){
|
||||
putLong(0, value);
|
||||
|
||||
public SignatureInfo getSignatureInfo(){
|
||||
return getParent(SignatureInfo.class);
|
||||
}
|
||||
@Override
|
||||
public String toString(){
|
||||
return String.valueOf(get());
|
||||
return "id=" + getSignatureId();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user